-
Notifications
You must be signed in to change notification settings - Fork 211
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
Use in PowerShell for Linux? #190
Comments
At the time I originally developed nvs, PowerShell was Windows-only. I haven't investigated what it would take to support PowerShell on Linux now, but I'm guessing sourcing I probably won't have time to work on this anytime soon, but I'd be happy to review a PR if someone else wants to pick it up. |
Is there a way for me to create a binary or a script for nvs (like nvs.exe for Windows) so that I can put it in |
Using a separate binary won’t work, for the same reason invoking |
Oh, I see. Thanks for the info! |
I have beginner PowerShell knowledge, but looking at nvs.ps1 file, I think we only need to change the node binary's URL (for platforms other than Windows) and subsequent extraction command (7zr.exe). Is this correct? |
@rashil2000 That sounds right. And you might also need to change the detection of processor arch, as I don't know whether there is a |
|
That's not enough if you're on an arm cpu. |
For such cases, we can simply fallback to using |
Hi, sorry for not getting back on this. I'm wondering if there's a much simpler way to achieve this: for Linux/macOS systems, the if (-not (Test-Path $bootstrapNodePath)) {
if (-not ($IsWindows -or $PSVersionTable.PSVersion.Major -eq 5)) {
& "$scriptDir/nvs" install
} else {
...
} Afterwards the If this is okay, I can try sending a PR for this. |
Yes, that's reasonable. As you said, there may still be some additional details to work out. |
I have sent a PR, it's a very minimal change - #207 Tested on Ubuntu 20.04. |
Hi! It's really nice to see a version manager that works consistently across OSes. However, the main reason I'm unable to use nvm.sh is because I use PowerShell everywhere.
So I would like to know how I can source the nvs.sh so that I can use nvs in PowerShell on Linux.
The text was updated successfully, but these errors were encountered: