-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Scoop checking ~/scoop instead of custom dir after update #4918
Comments
That's strange, I don't think the codebase has any code to erase/reset the SCOOP variable - it only reads it if found. Something else must be at play... |
I found a workaround. If we install without the Environment Variables using scoop installer, scoop will later look for the If i set the environment variables, it works properly. |
Not much of a workaround when you've already got several gigabytes installed. It would be nice if such breaking changes were announced in advance. |
There's no breaking change: this is a bug. Will need to investigate further. As mentioned in the top comment, manually readding the variable fixes the error. |
There is bug in the lib/core.ps1: the code uses the configuration before loading it:
The error gone when I moved these lines https://github.com/ScoopInstaller/Scoop/blob/master/lib/core.ps1#L1125-L1136 directly after the |
@rashil2000 I think the culprit is this commit 6296822. Step-by-step
|
Wow, you're right. Nice observation!
Can you make a PR for this? |
Bug Report
Current Behavior
Ran 'scoop update *', the app was updated to v0.2.0, tried running 'scoop list' and it returned 'no apps installed'.
Tried other commands and noticed hints to it looking in my Users dir.
Checked environment variables and noticed SCOOP was completely vanished.
Luckily, the app is otherwise very stable, so manually adding it again and pointing it to the desired dir fixed everything.
Expected Behavior
Updating Scoop to a new version should not result in the environment variables getting erased.
Additional context/output
I'm using a custom dir for my Scoop installation.
Possible Solution
Finding the technical cause to the environment variable getting erased.
System details
Windows version: 11 - 22000.613
OS architecture: 64bit
PowerShell version: 7.2.3
Additional software:
Other tools like MSYS2 always show warnings cause I've a Kaspersky security product, though I've never ran into any issues while running that shell or anything else - no conflicts detected while updating, and everything seemed normal till I was attempting my next command as described above.
Scoop Configuration
The text was updated successfully, but these errors were encountered: