We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mobaxterm
When I uninstall the mobaxterm package the pre_uninstall function throws an error if the configuration backup of scoop is disabled in the settings.
PS> scoop install extras/mobaxterm Open MobaXterm > Settings > General Disable configuration backup Close MobaXterm > Moba deletes 'MobaXterm backup.zip' PS> scoop uninstall extras/mobaxterm Running pre_uninstall script...Get-ChildItem : Cannot find path 'C:\Users\UID20852\scoop\apps\mobaxterm\24.2\MobaXterm backup.zip' because it does not exist. At line:2 char:10 + if ((Get-ChildItem "$dir\$file").LastWriteTime -gt (Get-ChildItem ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Users\UID208...term backup.zip:String) [Get-ChildItem], ItemNotFound Exception + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand done.
Add check if files exist before trying to access them: (Test-Path \"$dir\\$file\")
(Test-Path \"$dir\\$file\")
"pre_uninstall": [ "function UpdatesFile([string] $file) {", " if ((Test-Path \"$dir\\$file\") -and ((Get-ChildItem \"$dir\\$file\").LastWriteTime -gt (Get-ChildItem \"$persist_dir\\$file\").LastWriteTime)) {", " [System.IO.File]::WriteAllBytes(\"$persist_dir\\$file\", [System.IO.File]::ReadAllBytes(\"$dir\\$file\"))", " }", "}", "@('MobaXterm backup.zip', 'MobaXterm.ini') | ForEach-Object { UpdatesFile $_ }"
Current Scoop version: 859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080) 'main' bucket: 00828bfa7 (HEAD -> master, origin/master, origin/HEAD) pulumi: Update to version 3.131.0 'extras' bucket: 4846176a9 (HEAD -> master, origin/master, origin/HEAD) yuescript: Update to version 0.25.1 'java' bucket: 12fb891d (HEAD -> master, origin/master, origin/HEAD) temurin8-nightly-jre: Update to version 8.0.432-3.0.202409030846
last_update scoop_repo scoop_branch ----------- ---------- ------------ 2024-09-05T07:19:10.9436876+02:00 https://github.com/ScoopInstaller/Scoop master
Name Value ---- ----- PSVersion 5.1.19041.4648 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.4648 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prerequisites
Package Name
mobaxterm
Expected/Current Behaviour
When I uninstall the mobaxterm package the pre_uninstall function throws an error if the configuration backup of scoop is disabled in the settings.
Steps to Reproduce
Possible Solution
Add check if files exist before trying to access them:
(Test-Path \"$dir\\$file\")
Scoop and Buckets Version
Scoop Config
PowerShell Version
Additional Softwares
No response
The text was updated successfully, but these errors were encountered: