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-(un)hold): Correct output the messages when manifest not found, (already|not) held #5554

Merged
merged 6 commits into from
Oct 3, 2023

Conversation

HUMORCE
Copy link
Member

@HUMORCE HUMORCE commented Jun 21, 2023

Description

  • Abort hold when manifest not found
  • Abort hold when app already held
  • Abort unhold when app not held

Motivation and Context

Closes #5485 #5273

How Has This Been Tested?

Before:
#5485

After:

PS C:\Users\WDAGUtilityAccount> scoop hold mysql-workbench
Failed to hold 'mysql-workbench'.
PS C:\Users\WDAGUtilityAccount> scoop unhold mysql-workbench
Failed to unhold 'mysql-workbench'
PS C:\Users\WDAGUtilityAccount> scoop reset mysql-workbench
Resetting mysql-workbench (8.0.31).
Linking ~\scoop\apps\mysql-workbench\current => ~\scoop\apps\mysql-workbench\8.0.31
Creating shim for 'MySQLWorkbench'.
Creating shim for 'mysql'.
Creating shim for 'mysqldump'.
Creating shortcut for MySQLWorkbench (MySQLWorkbench.exe)
PS C:\Users\WDAGUtilityAccount> scoop hold mysql-workbench
mysql-workbench is now held and can not be updated anymore.
PS C:\Users\WDAGUtilityAccount> scoop unhold mysql-workbench
mysql-workbench is no longer held and can be updated again.

PS C:\Users\WDAGUtilityAccount> scoop hold mysql-workbench
mysql-workbench is now held and can not be updated anymore.
PS C:\Users\WDAGUtilityAccount> scoop hold mysql-workbench
'mysql-workbench' is already held.
PS C:\Users\WDAGUtilityAccount> scoop unhold mysql-workbench
mysql-workbench is no longer held and can be updated again.
PS C:\Users\WDAGUtilityAccount> scoop unhold mysql-workbench
'mysql-workbench' is not held.

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.

@rashil2000
Copy link
Member

We should use continue instead of abort. Aborting will exit the scoop process and will not proceed in case multiple apps are passed in for holding/unholding.

@HUMORCE HUMORCE changed the title fix(scoop-(un)hold): Abort when manifest not found, (already|not) held fix(scoop-(un)hold): Correct output the messages when manifest not found, (already|not) held Oct 3, 2023
@HUMORCE
Copy link
Member Author

HUMORCE commented Oct 3, 2023

Done

CHANGELOG.md Outdated Show resolved Hide resolved
@rashil2000 rashil2000 merged commit acc271d into ScoopInstaller:develop Oct 3, 2023
2 checks passed
CrendKing pushed a commit to CrendKing/Scoop that referenced this pull request Oct 3, 2023
…und, (already|not) held (ScoopInstaller#5554)

* fix(scoop-(un)hold): Abort when manifest not found

* abort when already held or not held

* use continue

* CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Rashil Gandhi <[email protected]>

---------

Co-authored-by: Rashil Gandhi <[email protected]>
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