Skip to content

Commit

Permalink
Update mamba.sh.in script (mamba-org#3422)
Browse files Browse the repository at this point in the history
* Update mamba.sh.in script

* Set root prefix

* Update mamba_package/etc/profile.d/mamba.sh.in

Co-authored-by: Julien Jerphanion <[email protected]>

---------

Co-authored-by: Julien Jerphanion <[email protected]>
  • Loading branch information
SylvainCorlay and jjerphan authored Aug 30, 2024
1 parent d51cd0e commit 4f73c92
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mamba_package/etc/profile.d/mamba.sh.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
__mamba_setup="$("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" shell hook --shell zsh --root-prefix "@CMAKE_INSTALL_PREFIX@" 2> /dev/null)"
export MAMBA_ROOT_PREFIX="@CMAKE_INSTALL_PREFIX@"
__mamba_setup="$("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" shell hook --shell posix 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias micromamba="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" # Fallback on help from mamba activate
alias mamba="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" # Fallback on help from mamba activate
fi
unset __mamba_setup

0 comments on commit 4f73c92

Please sign in to comment.