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: install Windows executable when executing install.sh in Git Bash #966

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

jdblischak
Copy link
Contributor

@jdblischak jdblischak commented Mar 12, 2024

Closes #965

This PR downloads and installs pixi in a Git Bash shell on Windows. I've updated install.sh to properly download the Linux Windows executable. However, the command chmod +x "$BIN_DIR/pixi" doesn't work on Windows, so I can't run pixi after downloading it. Any ideas?

@wolfv
Copy link
Member

wolfv commented Mar 12, 2024

Hmm, when you are on Windows, you should download the Windows binary. Or do I misunderstand something?

@wolfv
Copy link
Member

wolfv commented Mar 12, 2024

The chmod stuff can likely be skipped on Windows.

@jdblischak
Copy link
Contributor Author

Hmm, when you are on Windows, you should download the Windows binary. Or do I misunderstand something?

Doh. Good point. I was the one misunderstanding something. Now I understand how this can work. I'll test and push an update

@jdblischak jdblischak changed the title [WIP] Install Linux executable on Git Bash for Windows fix: install Windows executable when executing install.sh in Git Bash Mar 12, 2024
@jdblischak
Copy link
Contributor Author

Ok, now I've got it working in Git Bash

bash install/install.sh
## This script will automatically download and install Pixi (latest) for you.
## Getting it from this url: https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-pc-windows-msvc.zip
## ################################################################################################################ 100.0%
## Archive:  /tmp/.pixi_install.uZMw2jaz
##   inflating: /c/Users/john/.pixi/bin/pixi.exe
## The 'pixi' binary is installed into '/c/Users/john/.pixi/bin'
## Updating '/c/Users/john/.bash_profile'
## Please restart or source your shell.

# in a new shell
pixi --version
## pixi 0.16.1

ls -l ~/.pixi/bin/
## total 26624
## -rwxr-xr-x 1 john 197121 27260928 Mar 11 13:21 pixi.exe*

@wolfv
Copy link
Member

wolfv commented Mar 12, 2024

Cool! Then we just need to fix pixi shell next :)

@jdblischak
Copy link
Contributor Author

I also confirmed that my updates to support Git Bash did not break a standard installation in Ubuntu:

bash install/install.sh
## This script will automatically download and install Pixi (latest) for you.
## Getting it from this url: https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-unknown-linux-musl.tar.gz
## ####################################################################################################### 100.0%
## The 'pixi' binary is installed into '/home/wsl/.pixi/bin'
## Updating '/home/wsl/.bashrc'
## Please restart or source your shell.

# In a new shell
pixi --version
## pixi 0.16.1

@jdblischak
Copy link
Contributor Author

CI is green. Ready for review. Please let me know if you'd like me to rebase onto main

install/install.sh Outdated Show resolved Hide resolved
@wolfv
Copy link
Member

wolfv commented Mar 12, 2024

Looks good, one small comment

@wolfv wolfv merged commit 2b3607a into prefix-dev:main Mar 12, 2024
14 checks passed
@jdblischak jdblischak deleted the install-win-git-bash branch March 12, 2024 19:07
@W1M0R
Copy link

W1M0R commented May 30, 2024

Thank you @jdblischak and @wolfv, this is much appreciated.

I left a comment here that might offer a solution to the pixi shell issue, via the pixi shell-hook --shell bash method: #417 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to install pixi in Git Bash environment?
3 participants