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

Fix micromamba activate on Windows #3484

Merged
merged 1 commit into from
Sep 30, 2024
Merged
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
16 changes: 9 additions & 7 deletions libmamba/data/mamba_hook.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ __MAMBA_INSERT_MAMBA_EXE__
@SET __mambabin_dir=
@SET __mamba_root=

@echo off
@REM We need to define an alias with the same name as the executable to be called by the user.
@REM Get the base filename of MAMBA_EXE
@FOR %%A in ("%MAMBA_EXE%") do set "__mamba_filename=%%~nxA"
@REM Remove .exe extension from the filename
@SET "__mamba_name=!__mamba_filename:%~x1=!"
@REM Define correct alias depending on the executable name
@set "__mamba_cmd=call ""%MAMBA_BAT%"" $*"
@DOSKEY !__mamba_name!=!__mamba_cmd!

@FOR %%A in ("%MAMBA_EXE%") do (
@set "__mamba_filename=%%~nxA"
@REM Remove .exe extension from the filename
@SET "__mamba_name=!__mamba_filename:%~x1=!"
@REM Define correct alias depending on the executable name
@set "__mamba_cmd=call ""%MAMBA_BAT%"" $*"
@DOSKEY !__mamba_name!=!__mamba_cmd!
)
@SET CONDA_SHLVL=0
Loading