Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on micromamba install on Windows Git Bash #10

Open
2 tasks done
kylekeppler opened this issue Sep 26, 2023 · 2 comments
Open
2 tasks done

Error on micromamba install on Windows Git Bash #10

kylekeppler opened this issue Sep 26, 2023 · 2 comments

Comments

@kylekeppler
Copy link

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Micromamba

Search tried in issue tracker

ps unknown option

Latest version of Mamba

  • My problem is not solved with the latest version

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 AntoinePrv transferred this issue from mamba-org/mamba Sep 28, 2023
@AntoinePrv
Copy link
Member

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}?

@ifrh
Copy link

ifrh commented Nov 23, 2024

I am not the original questioner, but perhaps this output will be helpful.

In Windows Git Bash (MinGW64) the ps command has no option -o, where in Linux there is one.

Linux output


at@d7b:~$ ps --help

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).

Windows Git Bash output

i@T14 MINGW64 ~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs
$ ps --help
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



i@T14 MINGW64 ~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs
$ echo $PPID
1792

i@T14 MINGW64 ~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs
$ ps -o comm $PPID 2>/dev/null || echo "failed" | tail -1
failed

i@T14 MINGW64 ~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs
$ ps
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
     1793    1792    1793       8872  pty0      197610 23:47:21 /usr/bin/bash
     1823    1793    1823      12428  pty0      197610 23:49:10 /usr/bin/ps
     1792       1    1792       3764  ?         197610 23:47:21 /usr/bin/mintty

i@T14 MINGW64 ~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs
$ echo ${SHELL}
/usr/bin/bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants