mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-16 17:40:00 +00:00
fixed #444
This commit is contained in:
parent
69760f73d3
commit
b8bbaef7be
@ -1,6 +1,6 @@
|
|||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { Registry } from 'rage-edit'
|
import { Registry } from 'rage-edit-tmp'
|
||||||
import { HostAppService, Platform } from 'terminus-core'
|
import { HostAppService, Platform } from 'terminus-core'
|
||||||
|
|
||||||
import { ShellProvider, IShell } from '../api'
|
import { ShellProvider, IShell } from '../api'
|
||||||
@ -21,16 +21,7 @@ export class GitBashShellProvider extends ShellProvider {
|
|||||||
let gitBashPath = await Registry.get('HKLM\\Software\\GitForWindows', 'InstallPath')
|
let gitBashPath = await Registry.get('HKLM\\Software\\GitForWindows', 'InstallPath')
|
||||||
|
|
||||||
if (!gitBashPath) {
|
if (!gitBashPath) {
|
||||||
gitBashPath = await new Promise<string>(resolve => {
|
gitBashPath = await Registry.get('HKCU\\Software\\GitForWindows', 'InstallPath')
|
||||||
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) {
|
if (!gitBashPath) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user