ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.32k stars 1.37k forks source link

[Bug] Invoke-Git : The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. #6012

Closed JourneyOver closed 2 weeks ago

JourneyOver commented 2 weeks ago

Bug Report

Current Behavior

Pretty much just continue to get the error in the title whenever I run a scoop update without it doing much else, last time I had ran an update was like ~2ish weeks ago and it was working fine then.

Expected Behavior

For it to continue to work like it was before...

Additional context/output

the full error:

scoop update
Updating Scoop...
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:301
Line |
 301 |      return & $git @ArgumentList
     |               ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:301
Line |
 301 |      return & $git @ArgumentList
     |               ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:301
Line |
 301 |      return & $git @ArgumentList
     |               ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:301
Line |
 301 |      return & $git @ArgumentList
     |               ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:301
Line |
 301 |      return & $git @ArgumentList
     |               ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
ObjectNotFound: The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
ObjectNotFound: The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
ObjectNotFound: The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:283
Line |
 283 |          return & $git @ArgumentList
     |                   ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
&: C:\Users\JourneyOver\scoop\apps\scoop\current\lib\core.ps1:301
Line |
 301 |      return & $git @ArgumentList
     |               ~~~~
     | The term 'c:\program files\git\cmd\git.exe c:\program files\git\mingw64\bin\git.exe' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.

System details

Windows version: Windows 11

OS architecture: 64bit

PowerShell version:

Major Minor Build Revision 5 1 22621 2506

Additional software:

Git Cmder (Have tested on terminal, command prompt and powershell and all of them produce the same error)

Scoop Configuration

{
  "last_update": "2024-06-12T18:38:50.4890679-05:00",
  "scoop_branch": "develop",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop"
}
JourneyOver commented 2 weeks ago

I can confirm that it is to do with this commit right here -- https://github.com/ScoopInstaller/Scoop/pull/5998

If I go in and revert the change in the lib/core.ps1 file back to the original $HelperPath = (Get-Command git -ErrorAction Ignore).Source instead of what it changed to due to that commit, everything works perfectly.

JourneyOver commented 2 weeks ago

Going to go ahead and close this now since #6013 has been merged.