-
Notifications
You must be signed in to change notification settings - Fork 65
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: run choosenim update stable before downloading nim #279
base: master
Are you sure you want to change the base?
Conversation
Run `choosenim update stable` before downloading and installing nim. This prevents a local `stable` pointing to an old version of nim.`
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.
In general the right idea, but see my comments. Thank you for working on this!
scripts/choosenim-unix-init.sh
Outdated
# Update any existing local stable version to the latest nim stable version. | ||
"$temp_prefix/$filename" update stable | ||
|
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.
This can prompt, so I think it should go in the if branches below.
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.
Also, you can override the chosen channel as you can see below, you cannot assume stable
.
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.
Gotcha. Updated. Not sure I totally got the first comment, so let me know and I'll get things updated!
So I think you need it in both branches (one with |
@dom96 Updated. :) Without |
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.
Sorry, but thinking about this some more I think this logic should be implemented inside choosenim. i.e. if choosenim stable
is ran with the --firstInstall
flag then run update
implicitly. That way it's easier to keep this logic sound.
Resolves #264
Run
choosenim update stable
before downloading and installing nim.This prevents a local
stable
pointing to an old version of nim.`