Skip to content

Commit

Permalink
Removes absolute paths from mamba.bat and mamba_hook.bat
Browse files Browse the repository at this point in the history
Replaces macros expanded to absolute paths with prefix-independent code.
  • Loading branch information
pchemguy committed Dec 23, 2024
1 parent 6e6515e commit a99afc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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%"

@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

0 comments on commit a99afc0

Please sign in to comment.