ScoopInstaller / Extras

📦 The Extras bucket for Scoop.
https://scoop.sh
The Unlicense
1.74k stars 1.31k forks source link

[Bug] Error trying to update `sublime-merge` #8893

Open lucypero opened 1 year ago

lucypero commented 1 year ago

Bug Report

Current Behavior

Error trying to update sublime-merge

Additional context/output

Unlinking ~\scoop\apps\sublime-merge\current
Remove-Item: C:\Users\Lucy\scoop\apps\scoop\current\lib\install.ps1:945
Line |
 945 |          Remove-Item $currentdir -Recurse -Force -ErrorAction Stop
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot remove item C:\Users\Lucy\scoop\apps\sublime-merge\current\Data: Access to the path
     | 'C:\Users\Lucy\scoop\apps\sublime-merge\current\Data' is denied.

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 7.2.5

Scoop Configuration

No config

lucypero commented 1 year ago

If I use the old PowerShell that came with Windows 11, it works. I don't know what's going on.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
PS C:\Windows\System32> "$($PSVersionTable.PSVersion)"
5.1.22000.653

Must be some permissions thing.

tech189 commented 1 year ago

I occasionally have this issue when reinstalling other apps if I keep File Explorer open to the app's folder while updating and often a reboot is the only solution. For some reason even if you delete the old app's folder manually, you won't be able to install the new version because creating the folder with the same name is denied.

Try using LockHunter, it can tell you which processes are locking the misbehaving folder and help you delete them on reboot as a last resort. Hope this helps.