detect git-bash when installed for current user only (closes #161)

This commit is contained in:
Eugene Pankov 2017-08-18 18:28:38 +03:00
parent 80699ee13f
commit f53b96eba8

View File

@ -33,6 +33,19 @@ export class GitBashShellProvider extends ShellProvider {
})
})
if (!gitBashPath) {
gitBashPath = await new Promise<string>(resolve => {
let reg = new Registry({ hive: Registry.HKCU, key: '\\Software\\GitForWindows' })
reg.get('InstallPath', (err, item) => {
if (err || !item) {
resolve(null)
return
}
resolve(item.value)
})
})
}
if (!gitBashPath) {
return []
}