diff --git a/terminus-terminal/src/shells/cygwin32.ts b/terminus-terminal/src/shells/cygwin32.ts index 4d9fb095..3c0ce996 100644 --- a/terminus-terminal/src/shells/cygwin32.ts +++ b/terminus-terminal/src/shells/cygwin32.ts @@ -25,7 +25,7 @@ export class Cygwin32ShellProvider extends ShellProvider { let cygwinPath = await new Promise(resolve => { let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x86' }) reg.get('rootdir', (err, item) => { - if (err) { + if (err || !item) { return resolve(null) } resolve(item.value) diff --git a/terminus-terminal/src/shells/cygwin64.ts b/terminus-terminal/src/shells/cygwin64.ts index 85db2ae9..2d3f73cb 100644 --- a/terminus-terminal/src/shells/cygwin64.ts +++ b/terminus-terminal/src/shells/cygwin64.ts @@ -25,7 +25,7 @@ export class Cygwin64ShellProvider extends ShellProvider { let cygwinPath = await new Promise(resolve => { let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x64' }) reg.get('rootdir', (err, item) => { - if (err) { + if (err || !item) { return resolve(null) } resolve(item.value) diff --git a/terminus-terminal/src/shells/gitBash.ts b/terminus-terminal/src/shells/gitBash.ts index cfdecc38..68e12eae 100644 --- a/terminus-terminal/src/shells/gitBash.ts +++ b/terminus-terminal/src/shells/gitBash.ts @@ -25,7 +25,7 @@ export class GitBashShellProvider extends ShellProvider { let gitBashPath = await new Promise(resolve => { let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\GitForWindows' }) reg.get('InstallPath', (err, item) => { - if (err) { + if (err || !item) { resolve(null) return }