-
Notifications
You must be signed in to change notification settings - Fork 133
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
download command to download without installing/expanding #121
download command to download without installing/expanding #121
Conversation
Thanks for this PR too! This'll be great to have, and I think I'd prefer to have this Just wanted to let you know that I've seen and appreciate this PR, and it may take a bit more time to review and merge it. Thanks @art-divin. |
I am also implementing option to allow Later (this week will be delivered) I will be implementing commands such as I appreciate your feedback, though, don't waste time thanking me, we all are beneficiaries anyways 😄 |
Hmm, those commands don't sound like something I'd considered before. Could you tell me more about the problem you're solving and how you're planning on using them? |
Ha thanks for your interest! 😅 |
I've discovered that Also, there's an issue w/ URLSession option. The cache can become both invalid and large in size if there'd be multiple attempts of download w/ NSURLSessionDownloadTask. There's no way to specify URL for the cache files, they are put in |
OK, added support for --path flag, so |
adjusted progress reporting for when download only fixed missing replacement added support for --path flag fixed failing test fixed failing test x2
36b637f
to
b69cc15
Compare
Thanks for your patience @art-divin, I'm taking another look at this now. I'm going to rebase it on master and make a few changes. I'm going to rename the I'm also going to set a default value for
I think this behaviour is fine for xcodes' purposes, unless there's a particular reason you think the in-progress download data should be handled differently? Thanks for the contribution! |
b69cc15
to
2b85374
Compare
Closes #112
Sometimes it's useful to just download Xcode xip without expanding it.
The implemented solution shows progress as:
xcodes download 12.0 (1/1) Downloading Xcode 12.0.0: 5 %
where 1/6 step indicator is replaced by 1/1 depending on the used command (install vs. download)
When the download is finished, the following message appears:
Xcode 12.0.0 has been downloaded to /Users/<#redacted#>/Library/Application Support/com.robotsandpencils.xcodes/Xcode-12.0.0.xip
Flags and arguments are exactly as in "install" command, as such the actual code that creates "install" command is reused for both "download" and "install", and depending on the "shouldInstall" flag, one of two is created with appropriate --help configuration and other strings.