-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(foundryup): allow multiple installed versions #9551
Conversation
…e version dir on untar
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.
Tested, works well
if [ "$PLATFORM" = "win32" ]; then | ||
tmp="$(mktemp -d 2>/dev/null || echo ".")/foundry.zip" | ||
ensure download "$BIN_ARCHIVE_URL" "$tmp" | ||
ensure unzip "$tmp" -d "$FOUNDRY_BIN_DIR" | ||
ensure unzip "$tmp" -d "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG" |
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.
have to test this works OK on Win
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.
tested and files properly inflated / unzipped, plus also asking to confirm if you want to replace / skip file for already installed versions
70f4086
to
2b2ca34
Compare
@@ -240,7 +251,9 @@ USAGE: | |||
|
|||
OPTIONS: | |||
-h, --help Print help information | |||
-v, --version Install a specific version from built binaries | |||
-i, --install Install a specific version from built binaries |
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.
nits:
not a regression but running --install
without comments silently fails (this is expected but ideally should raise an error):
foundryup --install
ideally --use
without an argument should display foundryup: version not installed
, right now it panics with cp: cannot stat '/home/zerosnacks/.foundry/versions//forge': No such file or directory
foundryup --use
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.
Tested on MacOS + Linux, works well
Tiny find: --install
accepts 0.2.0
as a tag (will turn into v0.2.0
whereas --use
does not accept 0.2.0
, only v0.2.0
. Definitely not a blocker as v0.2.0
is correct.
For some reason foundryup changed from `-u` to `-i`... foundry-rs/foundry#9551
Motivation
-v, --version
tofoundryup -i
) (last one becomes active)~/.foundry/versions/
dir and can be listed withfoundryup -l
Solution