conda-forge / conda-forge/miniforge
installer fails under zsh
- Dominant language
- Shell
- Stars
- 10.2k
- Forks
- 530
- PR merge metrics
- No merged PRs in 30d
Description
### Solution to issue cannot be found in the documentation.
- [x] I checked the documentation.
### Issue
The installer claims to be compatible with zsh:
```
if ! echo "$0" | grep '\.sh$' > /dev/null; then
printf 'Please run using "bash"/"dash"/"sh"/"zsh", but not "." or "source".\n' >&2
exit 1
fi
```
But:
```
$ zsh ./Miniforge3-Linux-x86_64.sh
...
Linking urllib3-2.4.0-pyhd8ed1ab_0
Linking requests-2.32.3-pyhd8ed1ab_1
Linking conda-package-handling-2.4.0-pyh7900ff3_2
Linking conda-25.3.0-py312h7900ff3_0
Linking conda-libmamba-solver-25.3.0-pyhd8ed1ab_0
Transaction finished
./Miniforge3-Linux-x86_64.sh:426: no matches found: /home/guest/miniforge3/pkgs/envs/*/
```
This happens because of `set -e` and the directory does not exist so there are no matches. `zsh` fails and exits in this case, whereas `bash` succeeds.
### Installed packages
```shell
None
```
### Environment info
```shell
None
```
Contributor guide
Assessment
This issue has not been assessed yet.