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

Protect against attempting to download invalid versions #6

Open
PatOConnor43 opened this issue Jun 20, 2019 · 2 comments
Open

Protect against attempting to download invalid versions #6

PatOConnor43 opened this issue Jun 20, 2019 · 2 comments

Comments

@PatOConnor43
Copy link
Owner

Problem

The install script should validate the requested version before trying to download. This can result in empty downloads.

Proposed Solution

Either abort the install process if the user requests a version that is not included in the list-all script or allow supporting truncated versions (2 vs. 2.3.2) that will install the newest version version that starts with that major.

Reported in #5

@jerold
Copy link

jerold commented Apr 17, 2021

I think I'm running into this. The last line of asdf install dart <version> output says it's unzipping, but when I check the directory the version should have been installed to, it's empty

➜  asdf install dart 2.7.0
Platform 'darwin' supported!
Arch 'arm64' not supported!
Version: 2.7.0
Install Path: /Users/jerold/.asdf/installs/dart/2.7.0
Platform: macos
Architecture:
Downloading to temp directory asdf-dart.RWwe
Include Extras: 0
Major Dart Version: 2
Installing Dart SDK...
https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.0/sdk/dartsdk-macos--release.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   235  100   235    0     0   1058      0 --:--:-- --:--:-- --:--:--  1058
Unzipping Dart SDK to /Users/jerold/.asdf/installs/dart/2.7.0...

doesn't matter which version I try to install, the result is the same. The Arch 'arm64' not supported! line doesn't sound good.

@PatOConnor43
Copy link
Owner Author

I think this PR should solve your issue. I'm going to keep this issue open for now because it doesn't solve the invalid version case. The overall experience when you fail platform/architecture/unzip validation should be better though.
#16

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

No branches or pull requests

2 participants