You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting the above error whenever I try running any legit command. Here is the ouput from the terminal.
C:\Users\6008321\git\requisition-tool>legit sync
Traceback (most recent call last):
File "C:\Python27\Scripts\legit-script.py", line 9, in <module>
load_entry_point('legit==0.1.1', 'console_scripts', 'legit')()
File "C:\Python27\lib\site-packages\legit\cli.py", line 45, in main
cmd_map.get(arg).__call__(args)
File "C:\Python27\lib\site-packages\legit\cli.py", line 155, in cmd_sync
if repo.is_dirty():
File "C:\Python27\lib\site-packages\git\repo\base.py", line 502, in is_dirty
len(self.git.diff('HEAD', '--cached', *default_args)):
File "C:\Python27\lib\site-packages\git\cmd.py", line 227, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "C:\Python27\lib\site-packages\git\cmd.py", line 456, in _call_process
return self.execute(call, **_kwargs)
File "C:\Python27\lib\site-packages\git\cmd.py", line 335, in execute
**subprocess_kwargs
File "C:\Python27\lib\subprocess.py", line 711, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 948, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
I am on Windows 7.
The text was updated successfully, but these errors were encountered:
I dug into this further and from this post on StackOverflow, I found the solution.
The problem you see here is that the Windows API function CreateProcess, used by subprocess under the hood, doesn't auto-resolve other executable extensions than .exe. On Windows, the 'git' command is really installed as git.cmd. Therefore, you should modify your example to explicitly invoke git.cmd
So to workaround this issue, all I did is edit the subprocess.py file and convert "git" to "git.cmd" in the args parameter on line 942 and voila it works.
Now if only if someone could direct me in the correct direction (and correct project) to submit a patch for this..
I am getting the above error whenever I try running any legit command. Here is the ouput from the terminal.
I am on Windows 7.
The text was updated successfully, but these errors were encountered: