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

Refactor staging step for download strategies. #4424

Merged

Conversation

reitermarkus
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Refactor the staging step to explicitly include the destination directory in all commands.

Extracted from #4402.

@ghost ghost assigned reitermarkus Jul 5, 2018
@ghost ghost added the in progress Maintainers are working on this label Jul 5, 2018
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out, dramatically easier to review. Looks good 👍

@MikeMcQuaid MikeMcQuaid merged commit 11cbcdc into Homebrew:master Jul 5, 2018
@ghost ghost removed the in progress Maintainers are working on this label Jul 5, 2018
@reitermarkus reitermarkus deleted the refactor-download-strategies branch July 5, 2018 07:28
@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 5, 2018

Command output seems to be significantly uglier.
Before

==> Verifying gdb-8.1.tar.xz checksum
tar xJf /Users/joe/Library/Caches/Homebrew/gdb-8.1.tar.xz

After

==> Verifying gdb-8.1.tar.xz checksum
tar -x -J -f /Users/joe/Library/Caches/Homebrew/gdb-8.1.tar.xz -C /private/tmp/gdb-20180705-21040-1vk0rfk

I don't think specifying the output directory should have compromised aesthetics.

Also, it calls attention to the useless -J which doesn't actually flag any errors. You can pass -J to a gz archive or -z to an xz archive and tar will just do whatever it wants anyway. Maybe this isn't true on very old versions of macOS but now we're displaying the useless options with a neon sign.

@reitermarkus
Copy link
Member Author

I don't think specifying the output directory should have compromised aesthetics.

I can't change anything about the -C /private/tmp/gdb-20180705-21040-1vk0rfk part,
and xJf vs. -x -J -f is debatable.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 5, 2018

When all that's actually needed is xf, I think xJf was barely passable, and -x -J -f is just ugly.

@MikeMcQuaid
Copy link
Member

When all that's actually needed is xf, I think xJf was barely passable, and -x -J -f is just ugly.

Agreed here. Let's just xf

@MikeMcQuaid
Copy link
Member

Agreed here. Let's just xf

Done in #4431

@lock lock bot added the outdated PR was locked due to age label Aug 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants