maint: Warn about future removal of `etc/profile.d/mamba.sh` (#3788)

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
This commit is contained in:
Julien Jerphanion 2025-02-04 11:45:16 +02:00 committed by GitHub
parent d24f5d80bc
commit 60ae7b3f32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 3 deletions

View File

@ -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