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] Errors on installing/updating an app that creates a shortcut #5005

Closed
lewis-yeung opened this issue Jun 21, 2022 · 2 comments · Fixed by #5031
Closed

[Bug] Errors on installing/updating an app that creates a shortcut #5005

lewis-yeung opened this issue Jun 21, 2022 · 2 comments · Fixed by #5031
Labels

Comments

@lewis-yeung
Copy link
Contributor

Bug Report

Current Behavior

When I tried to install/update an app that creates a shortcut, Scoop ran into a series of errors showing Cannot find a provider with the name '[System.IO.Path]', Cannot bind argument to parameter 'Path' because it is null, etc.

Expected Behavior

No error happens.

Additional context/output

Terminal output: (taking scoop update 7zip as an example)

7zip: 21.07 -> 22.00
Updating one outdated app:
Updating '7zip' (21.07 -> 22.00)
Downloading new version
Starting download with aria2 ...
Download: Download Results:
Download: gid   |stat|avg speed  |path/URI
Download: ======+====+===========+=======================================================
Download: fccdcf|OK  |    91KiB/s|C:/Users/LY/scoop/cache/7zip#22.00#https_7-zip.org_a_7z2200-x64.msi
Download: Status Legend:
Download: (OK):download completed.
Checking hash of 7z2200-x64.msi ... ok.
Uninstalling '7zip' (21.07)
Removing shim '7z.shim'.
Removing shim '7z.exe'.
Unlinking ~\scoop\apps\7zip\current
Installing '7zip' (22.00) [64bit]
Loading 7z2200-x64.msi from cache.
Extracting 7z2200-x64.msi ... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\22.00
Creating shim for '7z'.
New-Item: C:\Users\LY\scoop\apps\scoop\current\lib\core.ps1:453
Line |
 453 |          New-Item -Path $dir -ItemType Directory | Out-Null
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find a provider with the name '[System.IO.Path]'.

Convert-Path: C:\Users\LY\scoop\apps\scoop\current\lib\core.ps1:455
Line |
 455 |      Convert-Path -Path $dir
     |      ~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find a provider with the name '[System.IO.Path]'.

Convert-Path: C:\Users\LY\scoop\apps\scoop\current\lib\shortcuts.ps1:28
Line |
  28 |  … onvert-Path $(ensure [System.IO.Path]::Combine([Environment]::GetFold …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'Path' because it is null.

OperationStopped: C:\Users\LY\scoop\apps\scoop\current\lib\shortcuts.ps1:57
Line |
  57 |      $wsShell.Save()
     |      ~~~~~~~~~~~~~~~
     | Unable to save shortcut "C:\7-Zip.lnk".

Creating shortcut for 7-Zip (7zFM.exe)
Persisting Codecs
Persisting Formats
Running post_install script...
'7zip' (22.00) was installed successfully!
Notes
-----
Add 7-Zip as a context menu option by running: "C:\Users\LY\scoop\apps\7zip\current\install-context.reg"

This is most likely related to a freshly merged PR #4410.

Possible Solution

None for the time being.

System details

  • Windows version: 11
  • OS architecture: 64bit
  • PowerShell version: 7.2.4

Scoop Configuration

{
  "lastUpdate": "2022-06-21T18:57:09.3466368+08:00",
  "SCOOP_REPO": "https://github.com/ScoopInstaller/Scoop",
  "SCOOP_BRANCH": "develop",
  "aria2-max-connection-per-server": 16,
  "aria2-split": 16,
  "aria2-min-split-size": "1M",
  "aria2-warning-enabled": false,
  "debug": true,
  "manifest_review": true
}
@rashil2000
Copy link
Member

Hey, thanks for the report! Can you check if #5006 fixes it?

@lewis-yeung
Copy link
Contributor Author

@rashil2000 Yeah, it does.

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.

2 participants