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

u3d/install: do not try to download unknown versions (i.e. not in cache) #57

Merged
merged 3 commits into from
Aug 9, 2017

Conversation

niezbop
Copy link
Member

@niezbop niezbop commented Aug 8, 2017

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.

@niezbop niezbop requested a review from lacostej August 8, 2017 20:40
Copy link
Member

@lacostej lacostej left a 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.

@@ -106,6 +106,10 @@ def download(args: [], options: {})

cache = Cache.new(force_os: os)
versions = cache[os.id2name]['versions']
unless versions[version]
Copy link
Member

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.

@niezbop
Copy link
Member Author

niezbop commented Aug 9, 2017

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.

@@ -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"
Copy link
Member

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

@niezbop
Copy link
Member Author

niezbop commented Aug 9, 2017

Log message updated!

niezbop added 3 commits August 9, 2017 23:14
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.
@niezbop niezbop force-pushed the checkversionincache branch from 4cf6b4d to c3f2d37 Compare August 9, 2017 21:14
@lacostej lacostej changed the title [FIX] Return earlier if version not in cache u3d/install: do not try to download unknown versions (i.e. not in cache) Aug 9, 2017
@niezbop niezbop merged commit 12f0c45 into DragonBox:master Aug 9, 2017
@niezbop niezbop deleted the checkversionincache branch August 9, 2017 21:23
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

Successfully merging this pull request may close these issues.

2 participants