[Bug]: scoop.cmd update *
from powershell.exe fails to update pwsh
#5452
darthwalsh
started this conversation in
General
Replies: 1 comment
-
Hi @darthwalsh! I honestly have no idea how to fix this. I will repeat what I've said in earlier threads - using Scoop to manage pwsh is not recommended. I personally just let Windows Update handle it for me. As a result of this, the pwsh manifest prints a warning the moment you install the package.
This is not possible to implement in pure Batch - it's a very primitive scripting language. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
Package Name
pwsh
Expected/Current Behaviour
Ideal Expected
I expect
scoop.cmd update pwsh
should work without failing about existing pwsh process.Workaround Expectation
If fixing this is not possible, then a better error message would be appreciated! Right now the text "Since Scoop uses pwsh.exe internally, to update PowerShell Core itself, run
scoop update pwsh
from Windows PowerShell, i.e. powershell.exe." never showed when the error happened. Instead, it only showed up after successfully updating :\I'd come back to #3572 multiple times trying to debug this problem, not realizing the difference between
scoop.cmd
andscoop
(which defaults toscoop.ps1
)Steps to Reproduce
(Assuming your scoop pwsh package is out of date. Don't have any pwsh instance running.)
Start as admin: powershell.exe
Running
scoop.cmd
fails but runningscoop
succeeded. I thought at first the difference was betweeninstall *
vs.install pwsh
but I think that's a red herring?Possible Solution
If scoop.cmd is being invoked by powershell.exe, this logic in scoop.cmd shim is unexected:
Instead, scoop.cmd could detect it is being run by powershell.exe and default to using powershell instead of pwsh
Scoop and Buckets Version
Scoop Config
PowerShell Version
Additional Softwares
I had vscode open but I was careful that all terminal sessions were closed.
Beta Was this translation helpful? Give feedback.
All reactions