From f53b96eba8d2a117458135357d167e6f1591e418 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 18 Aug 2017 18:28:38 +0300 Subject: [PATCH] detect git-bash when installed for current user only (closes #161) --- terminus-terminal/src/shells/gitBash.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/terminus-terminal/src/shells/gitBash.ts b/terminus-terminal/src/shells/gitBash.ts index 31e4a313..43f2995d 100644 --- a/terminus-terminal/src/shells/gitBash.ts +++ b/terminus-terminal/src/shells/gitBash.ts @@ -33,6 +33,19 @@ export class GitBashShellProvider extends ShellProvider { }) }) + if (!gitBashPath) { + gitBashPath = await new Promise(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 [] }