Skip to content

Conversation

@mwiebe
Copy link
Contributor

@mwiebe mwiebe commented Jun 20, 2025

(UPDATE: The dependent PR is merged and updated in pixi dependencies, this PR is ready for review/merge now) This depends on the PR conda/rattler#1392 for the bash shell hook to work correctly on Windows.

Create a function start_winbash for running bash on Windows that launches bash using the command:

$ bash --init-file <temp-shell-hook> -i

Here's an example output where I've built pixi against the rattler PR rebased to an older rattler commit that is compatible with the pixi main branch:

mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ echo $PATH
/c/Users/mw/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/mw/bin:...

mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ ./target/debug/pixi.exe shell
(pixi)
mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ echo $PATH
/c/Dev/pixi/.pixi/envs/default:/c/Dev/pixi/.pixi/envs/default/Library/mingw-w64/bin:
/c/Dev/pixi/.pixi/envs/default/Library/usr/bin:/c/Dev/pixi/.pixi/envs/default/Library/bin:
/c/Dev/pixi/.pixi/envs/default/Scripts:/c/Dev/pixi/.pixi/envs/default/bin:/c/Users/mw/bin:...
(pixi)
mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ echo $CONDA_PREFIX
C:\Dev\pixi\.pixi\envs\default

closes #417

@mwiebe mwiebe force-pushed the win-git-bash branch 7 times, most recently from d7ef829 to 1310559 Compare June 26, 2025 06:44
@lucascolley lucascolley added windows Related to MS Windows area:shell Related to pixi shell enhancement New features labels Jul 21, 2025
This depends on the PR conda/rattler#1392
for the bash shell hook to work correctly on Windows.

Create a function start_winbash for running bash on Windows
that launches bash using the command:

$ bash --init-file <temp-shell-hook> -i
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thank you! This works now 🎉

@ruben-arts ruben-arts merged commit e3995c5 into prefix-dev:main Aug 18, 2025
40 checks passed
@mwiebe mwiebe deleted the win-git-bash branch August 18, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:shell Related to pixi shell enhancement New features windows Related to MS Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git bash on windows no longer supports pixi shell

3 participants