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

git plugin do not use git.exe in the path anymore #39013

Closed
lguzzon opened this issue Nov 23, 2017 · 4 comments
Closed

git plugin do not use git.exe in the path anymore #39013

lguzzon opened this issue Nov 23, 2017 · 4 comments
Assignees
Labels
git GIT issues

Comments

@lguzzon
Copy link

lguzzon commented Nov 23, 2017

  • VSCode Version: Code - Insiders 1.19.0-insider (0c60476, 2017-11-23T06:12:57.338Z)
  • OS Version: Windows_NT ia32 10.0.16299
  • Extensions:
Extension Author (truncated) Version
markdown-toc Ala 1.5.6
pascal ale 0.10.0
vscode-markdownlint Dav 0.11.1
vscode-eslint dba 1.4.3
gitlens eam 6.1.2
tslint eg2 1.0.23
shell-format fox 1.1.1
nim kos 0.5.27
expand-region let 0.1.2
sublime-keybindings ms- 3.0.3
vshaxe nad 1.9.3
vscode-icons rob 7.18.1
code-settings-sync Sha 2.8.6
pegjs-language Sir 0.1.0
shellcheck tim 0.2.1
gitflow vec 1.1.1
expand-selection-to-scope vit 0.2.0
haxe-extension-pack vsh 1.0.0
codedox wig 1.2.5
change-case wma 1.0.0
join-lines wma 0.2.2
JavaScriptSnippets xab 1.5.0

(1 theme extensions excluded)


Steps to Reproduce:

  1. Have git installed via scoop.sh and in the PATH (it was working in previous VSCode versions)
  2. Start VS Code and see output windows for git

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the insiders label Nov 23, 2017
@vscodebot vscodebot bot added the git GIT issues label Nov 23, 2017
@lguzzon
Copy link
Author

lguzzon commented Nov 23, 2017

I've found a workaround:
insert in ..user/settings.json

{ ...,
    "git.path": "git"
}

@lguzzon
Copy link
Author

lguzzon commented Nov 23, 2017

Please consider to patch the function in git.js from this:

function findGitWin32(onLookup) {
    return findSystemGitWin32(process.env['ProgramW6432'], onLookup)
        .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles(x86)'], onLookup))
        .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles'], onLookup));
}

to this:

function findGitWin32(onLookup) {
    return findSystemGitWin32(process.env['ProgramW6432'], onLookup)
        .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles(x86)'], onLookup))
        .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles'], onLookup))
        .then(void 0, () => findSpecificGit('git', onLookup));
}

@joaomoreno
Copy link
Member

We had that since inception. It happens to break a lot of people: #32739 (comment) (and a lot of duplicate issues)

@rob3c
Copy link

rob3c commented Dec 7, 2017

@joaomoreno Have you already tried the standard node which module for finding git on the system path? It works well on all of my machines (famous last words), and I never install git in those three locations vscode currently checks. It had almost 20 million downloads last month alone.
https://www.npmjs.com/package/which

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

No branches or pull requests

3 participants