-
Notifications
You must be signed in to change notification settings - Fork 33
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
u3d/install: do not try to download unknown versions (i.e. not in cache) #57
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.
I don't understand why the version would not be in the cache either.
And there s one thing that won't work.
lib/u3d/commands.rb
Outdated
@@ -106,6 +106,10 @@ def download(args: [], options: {}) | |||
|
|||
cache = Cache.new(force_os: os) | |||
versions = cache[os.id2name]['versions'] | |||
unless versions[version] |
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 is too early. It won't work for non interpreted version. E.g. latest
.
Because the user could make a typo! Say one tries to install the version 56.1f1 (not 5.6.1.f1), it will still ask for credentials. |
lib/u3d/commands.rb
Outdated
@@ -107,6 +107,10 @@ def download(args: [], options: {}) | |||
cache = Cache.new(force_os: os) | |||
versions = cache[os.id2name]['versions'] | |||
version = interpret_latest(version, versions) | |||
unless versions[version] | |||
UI.error "No version #{version} was found in cache" |
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.
Version #{version} was not found. Either it doesn't exist or u3d doesn't know about it yet. Try refreshing with u3d available -f
Log message updated! |
u3d was going pretty far in the download process before realizing the version was not in the cache, and returning. It returns now way earlier.
4cf6b4d
to
c3f2d37
Compare
u3d was going pretty far in the download process before realizing the version was not in the cache, and returning. It returns now way earlier.