Skip to content

Could not find Git on the PATH - not recognized on windows #11

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

Closed
fernfab opened this issue Aug 22, 2019 · 5 comments · Fixed by #12
Closed

Could not find Git on the PATH - not recognized on windows #11

fernfab opened this issue Aug 22, 2019 · 5 comments · Fixed by #12
Assignees

Comments

@fernfab
Copy link

fernfab commented Aug 22, 2019

Message: "Could not find Git on the PATH"

OS - Windows 10 Pro

Git binaries on path:
C:\Users<user>\AppData\Local\Programs\Git\bin

Using git Bash:
which
/mingw64/bin/git

@kittaakos
Copy link
Contributor

Thanks for logging, @fernfab! Please confirm, does the Git feature work out of the box in VS Code?

@mcgordonite
Copy link

I see a similar problem when git can only be found on the PATH, e.g. when extracting the portable distribution of git for Windows somewhere on disk and adding it to the PATH.

In that case, the path returned from find-git-exec is just the string "git", rather than an absolute path as in all other cases. It stems from this line: https://github.com/TypeFox/find-git-exec/blob/master/src/find-git-exec.ts#L111.

VS Code git integration works fine for me with this set up.

You could use where.exe to convert it to an absolute path in this case, but I don't know if that's available before Windows 10.

@kittaakos
Copy link
Contributor

Thank you for help, @mcgordonite.

VS Code git integration works fine for me with this set up.

I am going to fix the issue and release a new version in the next days. Please bear with me.

@kittaakos kittaakos self-assigned this Oct 30, 2019
@kittaakos
Copy link
Contributor

For the record; I am going to add a dependency to which and do exactly what VS Code does.

kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos
Copy link
Contributor

@mcgordonite, can you please help to verify my changes? I have created a PR with the proposed fix: #12
Can you please try the following steps from a Git bash?

rm -rf ./find-git-exec/ \
&& git clone --single-branch -b GH-11 https://github.com/TypeFox/find-git-exec.git \
&& yarn --cwd ./find-git-exec \
&& yarn --cwd ./find-git-exec build \
&& yarn --cwd ./find-git-exec test

Verifying it from a PowerShell and/or a CMD.EXE would be a great help too 😊Once you have cloned and built from a Git Bash, it would be sufficient to run yarn test from the other shells. Thank you!

kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 5, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.
 - New version -> `0.0.2`.

Closes #11.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 20, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Use `execFile` instead of `spawn` to avoid broken pipes.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.
 - New version -> `0.0.2`.

Closes #11.

Co-authored-by: Alex Tugarev <[email protected]>
Co-authored-by: Akos Kitta <[email protected]>

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 20, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Listen on the process' `close` instead of `exit`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.
 - New version -> `0.0.2`.

Closes #11.

Co-authored-by: Alex Tugarev <[email protected]>
Co-authored-by: Akos Kitta <[email protected]>

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Nov 20, 2019
 - [win32]: Use `which` when cannot find Git on the `$PATH`.
 - Listen on the process' `close` instead of `exit`.
 - Moved the Windows build to Travis.
 - Pinned the versions with `yarn.lock`.
 - Bumped up the dependencies.
 - New version -> `0.0.2`.

Closes #11.

Co-authored-by: Alex Tugarev <[email protected]>
Co-authored-by: Akos Kitta <[email protected]>

Signed-off-by: Akos Kitta <[email protected]>
kittaakos added a commit that referenced this issue Nov 20, 2019
GH-11: Adjusted the lookup to the latest VS Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants