-
Notifications
You must be signed in to change notification settings - Fork 22
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
error: "git" returned status 1 #10
Comments
I get the same error. Linux Mint |
I'm unable to reproduce the issue on my local systems, could I see some of the console output from the developer console when you try to run the failing commands? |
I can see this message with the command [Extension Host] [gitflow] Execute git config --get gitflow.branch.master
[Extension Host] [gitflow] Command "git" returned code -4058:
spawn git ENOENT: Error: spawn git ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
WARNING: Promise with no error callback:94
Object {exception: null, error: Error: spawn git ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess…, promise: n.C…s.d…e._oncancel, handler: undefined, id: 94…}
spawn git ENOENT |
I would believe, this error comes, because git is not in the path. I had a look in the vscode discovery for the git config. They are using the @IGitService to access the internal git, which automatically detects the os specific git installation |
Hi @d-schiffner Git works in VS Code. I have only the GitHub Desktop app and their shell. In the PATH it's not ready. |
Hi @ajsb85, yes, VS Code searches internally for the correct path and then uses it. However, this plugin does not use the available service but instead calls git via shell, which is not defined. Not tested workaround: Add git to path |
@d-schiffner, thanks for the tips! I wasn't aware VSCode did that to find git. That should be helpful in fixing this problem now that I have a lead on what it actually going on. |
Hi @vector-of-bool so just use |
This only works, if you have defined a path there, or fall back to the normal assumption, that git is available from the path. |
Git is in my path on linux, but I still get the error. My debug console output is different, however:
|
So it turns out that my error is caused because I was using a newly initialized repository without any commits. The The invalid HEAD state causes the rest of the script to fail and the extension return code to be 1. The typo is in line 121. |
Thanks, @d-schiffner, for the awesome PR. I've just pushed out the changes, and, hopefully, this will fix the problems with Git. |
@vector-of-bool: You're welcome. Keep up the good work ;) |
Hello I seem to still be experiencing this problem and suggestions on how I can fix it? |
@jonathanfishbein1 are you starting with a repository that doesn't have any commits? If so, there is a bug that is not fixed by the latest release. |
After the changes in the new version of TypeScript you need to review in deep this extension @vector-of-bool |
I have created a pull request to fix the typo in the symbolic-ref: This bug will also cause the error where git will return 1. |
Is any still experiencing this exact issue? |
Still experiencing here. Latest OSX and VS Code. Tried in both newly initialized git projects (with and w/o commits), and in existing projects. No luck. VSCode doesn't appear to have any other problems accessing git. Git is in path. |
You will continue to get this error until the next release or you can clone the latest code and build it yourself. |
Anyone still experiencing this issue in the latest version? |
I just installed the extension on vscode for Mac and got this error after running "initialize repository for gitflow" |
I also got the same error on VS Code for Mac. All other git functions work as expected. |
This issue is still opened so I put it here. |
this is bcs you haven't had master and develop as branch in your local |
when I select 'Initialize repository for gitflow' ,at last step,an error occurred
error: "git" returned status 1
windows 10
vs code 1.8.1
The text was updated successfully, but these errors were encountered: