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] Uncommitted changes detected. Update aborted. #5926

Closed
xiaoxstz opened this issue Apr 27, 2024 · 6 comments
Closed

[Bug] Uncommitted changes detected. Update aborted. #5926

xiaoxstz opened this issue Apr 27, 2024 · 6 comments
Labels

Comments

@xiaoxstz
Copy link

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"
}
@xiaoxstz xiaoxstz added the bug label Apr 27, 2024
@qwertyhjklxyz
Copy link

qwertyhjklxyz commented Apr 27, 2024

It may be related to #5915.

@mattia72
Copy link

mattia72 commented Apr 27, 2024

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")

@qwertyhjklxyz
Copy link

One temporary solution is to add the scoop folder to windows defender exclusions.

@xiaoxstz
Copy link
Author

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

  1. Add the folder to the exclusion of Windows Defender (or other security software).
  2. Revert the changes with git.

@Reeceeboii
Copy link

Reeceeboii commented May 26, 2024

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

  1. Add the folder to the exclusion of Windows Defender (or other security software).
  2. Revert the changes with git.

For those who may be unaware of how to do this:

  1. You need to have git installed.
  2. Open Windows Defender, go to Virus & threat protection, then Manage settings under Virus & threat protection settings. Right down the bottom, there is an Add or remove exclusions option. Add C:\Users\<user>\scoop\apps\scoop\current to exclusions.
  3. Open a PowerShell session in that same directory, and do a git status. In my case, I saw that Windows Defender had kindly deleted autoupdate.ps1:
    image
  4. Undo this deletion (and any other unintended changes to this directory) by running git checkout .

image
6. Finally, do a scoop update

Everything should now be shiny and working again.

@wsw70
Copy link

wsw70 commented Jun 11, 2024

Yes. It is related to #5915 .

There must be another reason for this. Defender is not active on my machine (Defender-the-malware-defender, not Defender Firewall). The security of the host is based on an EDR (CrowdStrike) and there are no alerts related to scoop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants