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]: Powertoys uninstaller/post_install script fails if user folder contains a space #14617

Open
3 tasks done
hsiktas opened this issue Dec 22, 2024 · 0 comments
Open
3 tasks done
Labels

Comments

@hsiktas
Copy link
Contributor

hsiktas commented Dec 22, 2024

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

powertoys

Expected/Current Behaviour

During the updating of powertoys I get multiple errors while it tries to run the uninstaller/post_install scripts and the error message seems to be caused by the space in the path of my user folder.
This issue seems to be relatively new, and I don't remember it happening before with this package.

Steps to Reproduce

scoop update powertoys                                                                                     
powertoys: 0.87.0 -> 0.87.1
Updating one outdated app:
Updating 'powertoys' (0.87.0 -> 0.87.1)
Downloading new version
PowerToysUserSetup-0.87.1-x64.exe (274,1 MB) [================================================================] 100%
Checking hash of PowerToysUserSetup-0.87.1-x64.exe ... ok.
Uninstalling 'powertoys' (0.87.0)
Running uninstaller script...C:\Users\Hakan: The term 'C:\Users\Hakan' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
done.
Unlinking ~\scoop\apps\powertoys\current
Installing 'powertoys' (0.87.1) [64bit] from 'extras' bucket
Loading PowerToysUserSetup-0.87.1-x64.exe from cache
Running installer script...done.
Linking ~\scoop\apps\powertoys\current => ~\scoop\apps\powertoys\0.87.1
Creating shortcut for PowerToys (PowerToys.exe)
Running post_install script...C:\Users\Hakan: The term 'C:\Users\Hakan' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
done.
'powertoys' (0.87.1) was installed successfully!
Notes
-----
Add PowerToys context menu option by running:
Invoke-Expression -Command "C:\Users\Hakan Siktas\scoop\apps\powertoys\current\install-context.ps1"

If an error occurs when updating or uninstalling, execute the following command then retry:
`Stop-Process -Name 'explorer'`

Possible Solution

Either in this package or in some underlying scoop code, paths are not properly quoted/escaped. 🤷‍♂️

Scoop and Buckets Version

scoop --version                                                                                            
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:
7b4f9a186 (HEAD -> master, origin/master, origin/HEAD) v: Update to version 0.4.9

'extras' bucket:
f72e78253 (HEAD -> master, origin/master, origin/HEAD) stranslate: Update to version 1.2.12.1222

'versions' bucket:
4ce8978b0 (HEAD -> master, origin/master, origin/HEAD) rclone-beta: Update to version 1.69.0-beta.8468.a34c83951

'nirsoft' bucket:
b38031d (HEAD -> master, origin/master, origin/HEAD) updated manifests

'php' bucket:
8b0a06d (HEAD -> master, origin/master, origin/HEAD) fix: checkver php7.2-nts

'nerd-fonts' bucket:
aabc6b63 (HEAD -> master, origin/master, origin/HEAD) SarasaGothic: Update to version 1.0.26

'nonportable' bucket:
c00885e (HEAD -> master, origin/master, origin/HEAD) powertoys-np: Update to version 0.87.1

'java' bucket:
ea57af88 (HEAD -> master, origin/master, origin/HEAD) openjdk-ea: Update to version 24-29-ea

'games' bucket:
be0d29677 (HEAD -> master, origin/master, origin/HEAD) unciv: Update to version 4.14.17

Scoop Config

scoop config                                                                                               

aria2-enabled last_update         scoop_repo                           scoop_branch
------------- -----------         ----------                           ------------
        False 22.12.2024 17:13:14 https://github.com/lukesampson/scoop master

PowerShell Version

$PSVersionTable                                                                                            

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

@hsiktas hsiktas added the bug label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant