mamba-org / micromamba-releases

Micromamba executables mirrored from conda-forge as Github releases
63 stars 18 forks source link

Error on micromamba install on Windows Git Bash #10

Open kylekeppler opened 1 year ago

kylekeppler commented 1 year ago

Troubleshooting docs

How did you install Mamba?

Micromamba

Search tried in issue tracker

ps unknown option

Latest version of Mamba

Tried in Conda?

Not applicable

Describe your issue

Error using recommended micromamba install script on Windows Git Bash:

"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
ps: unknown option -- o

Indeed, the ps installed in my Git Bash does not have -o:

The installation continues and appears to work though.

$ ps -h
Usage: ps [-aefls] [-u UID] [-p PID]

Report process status

 -a, --all       show processes of all users
 -e, --everyone  show processes of all users
 -f, --full      show process uids, ppids
 -h, --help      output usage information and exit
 -l, --long      show process uids, ppids, pgids, winpids
 -p, --process   show information for specified PID
 -s, --summary   show process summary
 -u, --user      list processes owned by UID
 -V, --version   output version information and exit
 -W, --windows   show windows as well as cygwin processes

With no options, ps outputs the long format by default

mamba info / micromamba info

No response

Logs

No response

environment.yml

No response

~/.condarc

No response

AntoinePrv commented 1 year ago

Hi @kylekeppler, it must come from this line: https://github.com/mamba-org/micromamba-releases/blob/7225fdb6de390fe6b69c9cfc7fa4a5447c58d81a/install.sh#L6C1-L6C36

Since this is optional, maybe we can add a fallback like so $(ps -o comm $PPID 2>/dev/null || echo "failed" | tail -1). What does ps -o comm $PPID 2>/dev/null || echo "failed" | tail -1 produce for you? what about echo ${SHELL}?