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

remove unnecessary if block from nvm get artifact compression #3281

Closed

Conversation

imevanc
Copy link

@imevanc imevanc commented Feb 1, 2024

Changes

  • Remove an unnecessary if block from the get_artifact_compression function.

Reasons

  • Given that COMPRESSION is defaulted to tar.gz, we don't need to add another condition that assigns tar to the COMPRESSION variable.
  • I have experienced issues with the condition of the removed if block on M2 max macbooks.

Comment on lines -2242 to -2243
elif nvm_supports_xz "${VERSION}"; then
COMPRESSION='tar.xz'
Copy link
Member

Choose a reason for hiding this comment

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

it defaults to tar dot G z, and these lines set it to tar dot X z.

It's an entirely different format, and is quite intentional so the smaller xz format can be downloaded instead.

@ljharb
Copy link
Member

ljharb commented Feb 2, 2024

If you're experiencing issues, the best thing is to first file an issue rather than file an unsolicited PR removing lines that are there for a reason :-) happy to help if you file one!

@ljharb ljharb marked this pull request as draft February 2, 2024 05:13
@imevanc
Copy link
Author

imevanc commented Feb 3, 2024

I will open an issue shortly, thank you!

@imevanc imevanc closed this Feb 3, 2024
@imevanc imevanc deleted the update-nvm-get-artifact-compression branch February 3, 2024 23:59
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