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

fix(scoop-download|install|update): Use consistent options #5956

Merged
merged 2 commits into from May 14, 2024

Conversation

lewis-yeung
Copy link
Contributor

@lewis-yeung lewis-yeung commented May 10, 2024

Description

This PR is to fix a bug: the shorthand of the option --no-hash-check for the command scoop download should be -s instead of -h to be consistent with scoop install and scoop update, since the flag -h always means printing help text for a command.

BTW, the option --no-hash-check for scoop download is also inconsistent with --skip for scoop install or scoop update, even though they work the same way. For backwards compatibility, I did not adjust it. Should we?

EDITED: Use consistent options (-s/--skip-hash-check) for scoop download, scoop install and scoop update.

How Has This Been Tested?

- Run scoop download -h, and it prints the help text for us.
- Run scoop download -s <app>, and it skips the hash verification after the download, which is the expected behavior.

  1. Run the following to check available CLI options in the help text:

    • scoop download -h
    • scoop install -h
    • scoop update -h
  2. Run the following to skip hash validation:

    • scoop download -s <app>
    • scoop download --skip-hash-check <app>
    • scoop install -s <app>
    • scoop install --skip-hash-check <app>
    • scoop update -s <app>
    • scoop update --skip-hash-check <app>

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@niheaven
Copy link
Member

Prefer renaming all args to --skip-hash-check w/ -s.

@lewis-yeung
Copy link
Contributor Author

Prefer renaming all args to --skip-hash-check w/ -s.

@niheaven Agreed. Will update later.

niheaven
niheaven previously approved these changes May 10, 2024
Copy link
Member

@niheaven niheaven left a comment

Choose a reason for hiding this comment

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

LGTM, wait for other maintainers

@lewis-yeung lewis-yeung requested a review from niheaven May 10, 2024 14:46
@lewis-yeung lewis-yeung changed the title fix(scoop-download): Correct short option: -h -> -s fix(scoop-download|install|update): Use consistent options May 10, 2024
niheaven
niheaven previously approved these changes May 10, 2024
@niheaven niheaven merged commit 2d50a02 into ScoopInstaller:develop May 14, 2024
2 checks passed
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.

None yet

2 participants