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

[Bug] hold not working #5485

Closed
azmankudus opened this issue Apr 22, 2023 · 2 comments · Fixed by #5424
Closed

[Bug] hold not working #5485

azmankudus opened this issue Apr 22, 2023 · 2 comments · Fixed by #5424
Labels

Comments

@azmankudus
Copy link

Bug Report

Current Behavior

scoop update -a still pickup held app

Expected Behavior

scoop update -a should skip held app

Additional context/output

error while holding an app

$ scoop hold mysql-workbench
Get-Member: E:\Users\user\scoop\apps\scoop\current\libexec\scoop-hold.ps1:58
Line |
  58 |      $json | Get-Member -MemberType Properties | ForEach-Object { $ins …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You must specify an object for the Get-Member cmdlet.
MethodInvocationException: E:\Users\user\scoop\apps\scoop\current\lib\manifest.ps1:96
Line |
  96 |      [System.IO.File]::WriteAllLines("$dir\install.json", $file_conten …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "WriteAllLines" with "2" argument(s): "Could not find a part of the path
     | 'E:\Users\user\scoop\apps\mysql-workbench\current\install.json'."
mysql-workbench is now held and can not be updated anymore.
$ scoop update -a
mysql-workbench: 8.0.32 -> 8.0.33
oh-my-posh: 14.30.0 -> 14.32.0
openssh: 9.2.0.0p1 -> 9.2.2.0p1
postman: 10.12.13 -> 10.13.0
rust: 1.68.2 -> 1.69.0
telegram: 4.7.1 -> 4.8.0
temurin8-jdk: 8.0.362-9 -> 8.0.372-7
virtualbox-with-extension-pack-np: 7.0.6 -> 7.0.8
xnviewmp: 1.4.3 -> 1.4.4
zoom: 5.14.2.14578 -> 5.14.5.15287
Updating 10 outdated apps:
Updating 'mysql-workbench' (8.0.32 -> 8.0.33)
Downloading new version
Loading mysql-workbench-community-8.0.33-winx64.msi from cache
Checking hash of mysql-workbench-community-8.0.33-winx64.msi ... ok.
Uninstalling 'mysql-workbench' (8.0.32)
Installing 'mysql-workbench' (8.0.33) [64bit] from main bucket
Loading mysql-workbench-community-8.0.33-winx64.msi from cache
Extracting mysql-workbench-community-8.0.33-winx64.msi ... ERROR Exit code was 1603!
Failed to extract files from E:\Users\user\scoop\apps\mysql-workbench\8.0.33\mysql-workbench-community-8.0.33-winx64.msi.
Log file:
  ~\scoop\apps\mysql-workbench\8.0.33\msi.log

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/ScoopInstaller/Main/issues/new?title=mysql-workbench%408.0.33%3a+decompress+error

Possible Solution

System details

Windows version: [e.g. 7, 8, 10, 11]
11

OS architecture: [e.g. 32bit, 64bit, arm64]
64bit

PowerShell version: [output of "$($PSVersionTable.PSVersion)"]
7.3.4

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

//# Your configuration here
@azmankudus azmankudus added the bug label Apr 22, 2023
@HUMORCE
Copy link
Member

HUMORCE commented Apr 23, 2023

E:\Users\user\scoop\apps\mysql-workbench\current\install.json

Did you delete it?

@HUMORCE
Copy link
Member

HUMORCE commented Jun 21, 2023

Steps to reproduce:

PS C:\Users\WDAGUtilityAccount> scoop status -l

Name            Installed Version Latest Version Missing Dependencies Info
----            ----------------- -------------- -------------------- ----
mysql-workbench 8.0.33            99.0.33


PS C:\Users\WDAGUtilityAccount> scoop hold mysql-workbench
mysql-workbench is now held and can not be updated anymore.
PS C:\Users\WDAGUtilityAccount> scoop update mysql-workbench
WARN  'mysql-workbench' is held to version 8.0.33
Latest versions for all apps are installed! For more information try 'scoop status'
PS C:\Users\WDAGUtilityAccount> scoop unhold mysql-workbench
mysql-workbench is no longer held and can be updated again.
PS C:\Users\WDAGUtilityAccount> cd (scoop prefix mysql-workbench); cd ..
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> gci -name
8.0.33
current
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> mv 8.0.33 8.0
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> gci -name
8.0
current
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> scoop status

Name            Installed Version Latest Version Missing Dependencies Info
----            ----------------- -------------- -------------------- ----
mysql-workbench 8.0               99.0.33


PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> scoop hold mysql-workbench
Get-Member : You must specify an object for the Get-Member cmdlet.
At C:\Users\WDAGUtilityAccount\scoop\apps\scoop\current\libexec\scoop-hold.ps1:58 char:13
+     $json | Get-Member -MemberType Properties | ForEach-Object { $ins ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-Member], InvalidOperationException
    + FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand

Exception calling "WriteAllLines" with "2" argument(s): "Could not find a part of the path
'C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench\current\install.json'."
At C:\Users\WDAGUtilityAccount\scoop\apps\scoop\current\lib\manifest.ps1:96 char:5
+     [System.IO.File]::WriteAllLines("$dir\install.json", $file_conten ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DirectoryNotFoundException

mysql-workbench is now held and can not be updated anymore.
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> scoop update mysql-workbench
mysql-workbench: 8.0 -> 99.0.33
Updating one outdated app:
Updating 'mysql-workbench' (8.0 -> 99.0.33)
Downloading new version
...

Junction current not updated after original dir renamed.

PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> (Get-Item current).Target
C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench\8.0.33
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> scoop reset mysql-workbench
Resetting mysql-workbench (8.0).
Linking ~\scoop\apps\mysql-workbench\current => ~\scoop\apps\mysql-workbench\8.0
Creating shim for 'MySQLWorkbench'.
Creating shim for 'mysql'.
Creating shim for 'mysqldump'.
Creating shortcut for MySQLWorkbench (MySQLWorkbench.exe)
PS C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench> (Get-Item current).Target
C:\Users\WDAGUtilityAccount\scoop\apps\mysql-workbench\8.0

Strictly, this is not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants