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

Removes absolute paths from mamba.bat and mamba_hook.bat #3709

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions libmamba/data/mamba.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

@REM Replaced by mamba executable with the MAMBA_EXE and MAMBA_ROOT_PREFIX variable pointing
@REM to the correct locations.
__MAMBA_DEFINE_MAMBA_EXE__
__MAMBA_DEFINE_ROOT_PREFIX__
@SET "CURDIR=%CD%"
@CD /d "%~dp0.."
@SET "MAMBA_ROOT_PREFIX=%CD%"
@SET "MAMBA_EXE=%CD%\Library\bin\mamba.exe"
@CD /d "%CURDIR%"
Copy link
Member

@JohanMabille JohanMabille Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break micromamba installs, which install path can be anything and is independent from the root prefix.


@IF [%1]==[activate] "%~dp0__MAMBA_INSERT_ACTIVATE_BAT_NAME__" %*
@IF [%1]==[deactivate] "%~dp0__MAMBA_INSERT_ACTIVATE_BAT_NAME__" %*
Expand Down
2 changes: 1 addition & 1 deletion libmamba/data/mamba_hook.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@SET "PATH=%__mambabin_dir%;%PATH%"
@SET "MAMBA_BAT=%__mambabin_dir%\__MAMBA_INSERT_BAT_NAME__"
@FOR %%F in ("%__mambabin_dir%") do @SET "__mamba_root=%%~dpF"
__MAMBA_DEFINE_MAMBA_EXE__
@SET "MAMBA_EXE=%__mamba_root%Library\bin\mamba.exe"
@SET __mambabin_dir=
@SET __mamba_root=

Expand Down
Loading