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

Installing anything new fails with multiple PS errors, 'local:url' not recognized #4444

Closed
ev-dev opened this issue Sep 1, 2021 · 9 comments

Comments

@ev-dev
Copy link

ev-dev commented Sep 1, 2021

Any attempts to install something throws multiple unexpected powershell errors from scoop's depends.ps1 & install.ps1

Steps to reproduce:
> scoop install wget (tested with many apps)

Output:

url: C:\Users\evdev\scoop\apps\scoop\current\lib\depends.ps1:83
   83 |  … lled -Helper Lessmsi) -and (Test-LessmsiRequirement -URL (url $manife
        | The term 'local:url' is not recognized as a name of a cmdlet, function,....

url: C:\Users\evdev\scoop\apps\scoop\current\lib\install.ps1:529
 529 |      $urls = @(url $manifest $architecture)
        | The term 'local:url' is not recognized as a name of a cmdlet, function,....

url: C:\Users\evdev\scoop\apps\scoop\current\lib\install.ps1:203
 203 |      $urls = @(url $manifest $architecture)
        | The term 'local:url' is not recognized as a name of a cmdlet, function,....
...

Can't shim 'wget': File doen't exist.

It's been a few weeks since I installed anything new via scoop, and updates have been working fine so I'm pretty stumpted as to what the actual underlying problem is and whether or not it's something specific to my env.
Any help would be greatly appreciated!

@HUMORCE
Copy link
Member

HUMORCE commented Sep 4, 2021

already reinstalled scoop?

@ev-dev
Copy link
Author

ev-dev commented Sep 5, 2021

Welp I was trying to avoid that since I have so many running services/apps installed with scoop but since I'm the one asking for help I figured I should go thru with the trouble so after scoop list > ~\scoop_apps.txt I nervously del -Force ~\scoop (note to others seeking a clean reinstall, you may have other scoop related directories like C:\Program Files (x86)\scoop to remove if true clean state is desired).

I actually did run into the same errors from this issue when I tried scoop install sudo BUT then I realized I've been doing everything in powershell preview (7.2 p9) so I repeated the reinstall via powershell 5 (the preinstalled old school blue one) and of course, the issue went away 😥

The scoop install issue does still occur for me under powershell v7 stable (7.1.4) and preview (7.2 preview 9).

I tried to do a bit of exploring the src to try and come up with what may be a potential issue coming in powershell 7.2, but I'm not really well versed enough in debugging powershell (if anyone is...sorry to hate). Seems like the error is coming from the Find-Manifest or find_manifest functions perhaps when checking for paths of local manifests. Apologies for lack of effort...I'll try harder if anyone else encounters this!

@Cologler
Copy link

Cologler commented Sep 5, 2021

Currently, scoop is run on the current PowerShell instance, I guess your $profile added alias and it overrides the default scoop function.

To confirm that, try using pwsh -NoProfile $(Resolve-Path ~\scoop\shims\scoop.ps1) install ... to install the app and see if it is okay.

@Fooughhy
Copy link

Fooughhy commented Dec 5, 2021

I believe at least one version of the same issue has been present for a long time, #4185, but was fixed. I've had the Pansies module disabled, but was able to enable it again once that issue was fixed. It seems that (#4342 and #4492) did not fix all instances of the issue.

If I do "Remove-Module Pansies", the issue disappears.

@rashil2000
Copy link
Member

Could you point us to more instances of the code which causes the error?

@Fooughhy
Copy link

Fooughhy commented Dec 5, 2021

Sorry, this might not be exactly the same. I simply saw the same error that I've seen before, but I see now that he has "local:url" everywhere, and not "script:url" or simply "url" which was the issue before.

But there is an error in the repo:

if (!(Test-HelperInstalled -Helper Zstd) -and (Test-ZstdRequirement -URL (url $manifest $arch))) {

"url" here should be "script:url", I would assume. Don't know very much about powershell coding, but that was the fix in my linked PRs and if you look just above, you'll see:

if (!(Test-HelperInstalled -Helper 7zip) -and (Test-7zipRequirement -URL (script:url $manifest $arch))) {

if (!(Test-HelperInstalled -Helper Lessmsi) -and (Test-LessmsiRequirement -URL (script:url $manifest $arch))) {

@rashil2000
Copy link
Member

But there is an error in the repo:

if (!(Test-HelperInstalled -Helper Zstd) -and (Test-ZstdRequirement -URL (url $manifest $arch))) {

Yes, looks like this was indeed overlooked. Can you make this change in your local Scoop folder and see if it resolves the Pansies error?

@Fooughhy
Copy link

Fooughhy commented Dec 5, 2021

Yes, that seems to fix it.

rashil2000 added a commit that referenced this issue Dec 6, 2021
@rashil2000
Copy link
Member

Fixed.

Thanks!

se35710 pushed a commit to se35710/scoop that referenced this issue Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants