Skip to content

Commit

Permalink
maint: Warn about future removal of etc/profile.d/mamba.sh (#3788)
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <[email protected]>
  • Loading branch information
jjerphan authored Feb 4, 2025
1 parent d24f5d8 commit 60ae7b3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions micromamba/etc/profile.d/mamba.sh.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
echo "WARNING: @CMAKE_INSTALL_PREFIX@/etc/profile.d/mamba.sh (the file emitting this warning) is deprecated."
echo "WARNING: This file will be removed in mamba 2.1.0."
echo "WARNING: Please use 'mamba shell init' to get the correct shell scripts for your shell."

if [ -z "${MAMBA_ROOT_PREFIX}" ]; then
echo "WARNING: MAMBA_ROOT_PREFIX is not set."
echo "WARNING: Please set `MAMBA_ROOT_PREFIX` to the root of your installation."
echo "WARNING: For now continuing with `MAMBA_ROOT_PREFIX` set to `@CMAKE_INSTALL_PREFIX@`."
echo "WARNING: The MAMBA_ROOT_PREFIX environment variable is not set."
echo "WARNING: This is required for mamba to work correctly as of 2.0."
echo "WARNING: "
echo "WARNING: For now, we are setting 'MAMBA_ROOT_PREFIX' to '@CMAKE_INSTALL_PREFIX@'."
echo "WARNING: "
echo "WARNING: Please make sure this is consistent with your installation or alternatively (by order of preference):"
echo "WARNING: - rerun 'mamba shell init -s posix' to get the correct value"
echo "WARNING: - manually set 'MAMBA_ROOT_PREFIX' to the root of your installation in your shell profile script."
echo "WARNING: - use the '-r,--root-prefix' CLI option when calling mamba."
echo "WARNING: "
echo "WARNING: This message originates from @CMAKE_INSTALL_PREFIX@/etc/profile.d/mamba.sh"
export MAMBA_ROOT_PREFIX="@CMAKE_INSTALL_PREFIX@"
fi

Expand Down

0 comments on commit 60ae7b3

Please sign in to comment.