提交 b8bbaef7 编写于 作者: E Eugene Pankov

fixed #444

上级 69760f73
import * as path from 'path'
import { Injectable } from '@angular/core'
import { Registry } from 'rage-edit'
import { Registry } from 'rage-edit-tmp'
import { HostAppService, Platform } from 'terminus-core'
import { ShellProvider, IShell } from '../api'
......@@ -21,16 +21,7 @@ export class GitBashShellProvider extends ShellProvider {
let gitBashPath = await Registry.get('HKLM\\Software\\GitForWindows', 'InstallPath')
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)
})
})
gitBashPath = await Registry.get('HKCU\\Software\\GitForWindows', 'InstallPath')
}
if (!gitBashPath) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册