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] 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 opened this issue Jun 13, 2024 · 2 comments · Fixed by #6035
Labels

Comments

@JourneyOver
Copy link

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
Copy link
Author

JourneyOver commented Jun 13, 2024

I can confirm that it is to do with this commit right here -- #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
Copy link
Author

JourneyOver commented Jun 13, 2024

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

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

Successfully merging a pull request may close this issue.

1 participant