mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
detect 32-bit Cygwin setups (fixes #106)
This commit is contained in:
parent
475c4f91be
commit
6f8f83d178
@ -68,11 +68,10 @@ export class TerminalSettingsTabComponent {
|
|||||||
|
|
||||||
// Detect Cygwin
|
// Detect Cygwin
|
||||||
let cygwinPath = await new Promise<string>(resolve => {
|
let cygwinPath = await new Promise<string>(resolve => {
|
||||||
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup' })
|
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x64' })
|
||||||
reg.get('rootdir', (err, item) => {
|
reg.get('rootdir', (err, item) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
resolve(null)
|
return resolve(null)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
resolve(item.value)
|
resolve(item.value)
|
||||||
})
|
})
|
||||||
@ -81,6 +80,20 @@ export class TerminalSettingsTabComponent {
|
|||||||
this.shells.push({ name: 'Cygwin', command: path.join(cygwinPath, 'bin', 'bash.exe') })
|
this.shells.push({ name: 'Cygwin', command: path.join(cygwinPath, 'bin', 'bash.exe') })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Detect 32-bit Cygwin
|
||||||
|
let cygwin32Path = await new Promise<string>(resolve => {
|
||||||
|
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x86' })
|
||||||
|
reg.get('rootdir', (err, item) => {
|
||||||
|
if (err) {
|
||||||
|
return resolve(null)
|
||||||
|
}
|
||||||
|
resolve(item.value)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if (cygwin32Path) {
|
||||||
|
this.shells.push({ name: 'Cygwin (32 bit)', command: path.join(cygwin32Path, 'bin', 'bash.exe') })
|
||||||
|
}
|
||||||
|
|
||||||
// Detect Git-Bash
|
// Detect Git-Bash
|
||||||
let gitBashPath = await new Promise<string>(resolve => {
|
let gitBashPath = await new Promise<string>(resolve => {
|
||||||
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\GitForWindows' })
|
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\GitForWindows' })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user