[Bug] Uncommitted changes detected. Update aborted.
xiaoxstz opened this issue · comments
Bug Report
Current Behavior
The output of scoop status
tells me to run scoop update
λ scoop status
WARN Scoop out of date. Run 'scoop update' to get the latest changes.
But the scoop update
came across this warning.
λ scoop update
Updating Scoop...
WARN Uncommitted changes detected. Update aborted.
Updating Buckets...
Scoop was updated successfully!
Then, let's run scoop status
again. The warning still is in the output
λ scoop status
WARN Scoop out of date. Run 'scoop update' to get the latest changes.
There was an issue #5458 before, but it was closed with no details.
Expected Behavior
No any warning.
Additional context/output
Possible Solution
System details
Windows version: [e.g. 7, 8, 10, 11] 10
OS architecture: [e.g. 32bit, 64bit, arm64]: 64bit
PowerShell version: [output of "$($PSVersionTable.PSVersion)"
]
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 4291
Additional software: [(optional) e.g. ConEmu, Git]: ConEmu,Git
Scoop Configuration
//# Your configuration here
{
"last_update": "2024-04-27T09:52:07.6653120+08:00",
"aria2-enabled": false,
"scoop_repo": "https://github.com/ScoopInstaller/Scoop",
"scoop_branch": "master"
}
It may be related to #5915.
+1 I'm experiencing both error. Defender deletes autoupdate.ps1
.
PS ...\scoop\apps\scoop\current> git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: lib/autoupdate.ps1
no changes added to commit (use "git add" and/or "git commit -a")
One temporary solution is to add the scoop folder to windows defender exclusions.
Yes. It is related to #5915 .
Reason
This issue appears when something in {UserProfile}\scoop\apps\scoop\current
changes. If you haven't done it, security software(such as Windows Defender
) is to blame.
{UserProfile}\scoop\apps\scoop\current
is a git repository. You can check all the changes using git status
.
Solution
- Add the folder to the exclusion of
Windows Defender
(or other security software). - Revert the changes with git.