Skip to content

feat(scoop-hold,scoop-unhold): Support -g/--global flag#4991

Merged
rashil2000 merged 2 commits intoScoopInstaller:developfrom
lewis-yeung:develop
Jun 17, 2022
Merged

feat(scoop-hold,scoop-unhold): Support -g/--global flag#4991
rashil2000 merged 2 commits intoScoopInstaller:developfrom
lewis-yeung:develop

Conversation

@lewis-yeung
Copy link
Copy Markdown
Contributor

Description

Support a -g/--global flag for scoop hold/scoop unhold, which tells Scoop to hold/unhold globally installed apps.

Motivation and Context

Closes #4990.

How Has This Been Tested?

  1. Install an app both user-scoped and globally: scoop install <app> and scoop install -g <app>.

  2. Hold/unhold the user-scoped app: scoop hold <app>/scoop unhold <app>. This does not require admin privileges.

  3. Hold/unhold the global app without admin privileges: scoop hold -g <app>/scoop unhold -g <app>. It shows an error:

    ERROR You need admin rights to hold a global app.
    ERROR You need admin rights to unhold a global app.
    
  4. Hold/unhold the global app with admin privileges: sudo scoop hold -g <app>/sudo scoop unhold -g <app>. It works as expected. (Assuming that sudo has been installed properly.)

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.

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.

3 participants