-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add one-liner for installing cargo-binstall
on Windows
#1099
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I have no knowledge of powershell, it seems to me that this script closely mirrors our unix script.
@passcod Can you review this please since you clearly know more about powershell than me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, once @passcod approved this we can merge it
Thanks, I do have an aarch64 windows running in VM on M1 that can test this. |
@supleed2 Executing this on windows powershell give the following error:
|
`&&` was added in Powershell 7
@NobodyXu Thanks for testing, it seems
|
Seems like it is installed to the wrong location:
There is no |
I'm not sure what happened then, because https://github.com/supleed2/cargo-binstall/blob/f2ed7bfc043fb42740c5ae2b97e76dcb3bb5a3ee/install-from-binstall-release.ps1#L15 simply calls the executable the same way as the bash script. Maybe the
is equivalent to
Invoke-Expression is needed because of the variable |
It gives me
|
Sorry, I just realised 😅 if the check failed, you would have seen the |
No.
I just realized that I haven't seen any output from cargo-binstall when using the one-liner |
But it works if you download & extract the file manually and run |
I will have a try later |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I forgot to move the file out of the preview.
|
I tried this again and this time it works:
|
@passcod Can you review this please and run this on x64 windows, if you have time? |
@passcod Pinging just in case you forgot this. |
Don't have time at the moment sorry. |
Thanks nonetheless, @passcod I think we can merge it as-is for now, and fix it if there is any issue reported later? |
I saw the one-liner added for Unix systems (in #1073 / #1074) and thought it should be possible for Windows :)
The script should have the same behaviour as the Bash version, and the oneliner temporarily (scoped to the current terminal session) disables Powershell's Execution Policy.
The url used in the script is for after the PR is merged, use the following if you want to test: