-
Notifications
You must be signed in to change notification settings - Fork 251
fixing the cli option retry_download_count to support simulator #405
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
base: master
Are you sure you want to change the base?
Changes from 8 commits
6c56bc6
3043349
0f96458
4346244
a44cd49
0416bc1
094549d
1e19ac4
323dff9
fdc2749
c14e5d2
6390847
d77e6b8
65d6900
5c39dc5
604d308
0909d80
dbacf6e
3c92030
e27710a
3062bd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ def self.options | |
| ['--no-progress', 'Don’t show download progress.'], | ||
| ['--no-clean', 'Don’t delete DMG after installation.'], | ||
| ['--no-show-release-notes', 'Don’t open release notes in browser after installation.'], | ||
| ['--retry-download-count', 'Count of retrying download when curl is failed.']].concat(super) | ||
| ['--number-of-try', 'How many times try to download DMG file if downloading fails. Default is 3.']].concat(super) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I’m confused on what the reasoning for this rename is. This is technically a breaking change, isn’t it? Was there some issue with If anything, I would maybe recommend this to be named
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that this would be better for grammar.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the parameter to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! I will pull down and play with one more time after I’m done taking the doggo for a walk 😊 Thanks again for this PR! I’ll get it release in an hour or so if all is 💯 (which is looks like it should be) |
||
| end | ||
|
|
||
| def initialize(argv) | ||
|
|
@@ -32,7 +32,7 @@ def initialize(argv) | |
| @should_switch = argv.flag?('switch', true) | ||
| @progress = argv.flag?('progress', true) | ||
| @show_release_notes = argv.flag?('show-release-notes', true) | ||
| @retry_download_count = argv.option('retry-download-count', '3') | ||
| @number_of_try = argv.option('number-of-try', '3') | ||
|
gunesmes marked this conversation as resolved.
Outdated
|
||
| super | ||
| end | ||
|
|
||
|
|
@@ -46,12 +46,12 @@ def validate! | |
| end | ||
| fail Informative, "Version #{@version} doesn't exist." unless @url || @installer.exist?(@version) | ||
| fail Informative, "Invalid URL: `#{@url}`" unless !@url || @url =~ /\A#{URI.regexp}\z/ | ||
| fail Informative, "Invalid Retry: `#{@retry_download_count} is not positive number.`" if (@retry_download_count =~ /\A[0-9]*\z/).nil? | ||
| fail Informative, "Invalid Retry: `#{@number_of_try} is not positive number.`" if (@number_of_try =~ /\A[0-9]*\z/).nil? | ||
| end | ||
|
|
||
| def run | ||
| @installer.install_version(@version, @should_switch, @should_clean, @should_install, | ||
| @progress, @url, @show_release_notes, nil, @retry_download_count.to_i) | ||
| @progress, @url, @show_release_notes, nil, @number_of_try.to_i) | ||
| end | ||
| end | ||
| end | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.