Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
85f6f442
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
85f6f442
编写于
12月 15, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
find git in LocalAppData and PATH, win32
fixes #40229
上级
816be678
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
3 deletion
+27
-3
extensions/git/package.json
extensions/git/package.json
+4
-2
extensions/git/src/git.ts
extensions/git/src/git.ts
+9
-1
extensions/git/yarn.lock
extensions/git/yarn.lock
+14
-0
未找到文件。
extensions/git/package.json
浏览文件 @
85f6f442
...
...
@@ -954,13 +954,15 @@
"file-type"
:
"^7.2.0"
,
"iconv-lite"
:
"0.4.19"
,
"vscode-extension-telemetry"
:
"0.0.8"
,
"vscode-nls"
:
"2.0.2"
"vscode-nls"
:
"2.0.2"
,
"which"
:
"^1.3.0"
},
"devDependencies"
:
{
"@types/byline"
:
"4.2.31"
,
"@types/file-type"
:
"^5.2.1"
,
"@types/mocha"
:
"2.2.43"
,
"@types/node"
:
"7.0.43"
,
"@types/which"
:
"^1.0.28"
,
"mocha"
:
"^3.2.0"
}
}
\ No newline at end of file
}
extensions/git/src/git.ts
浏览文件 @
85f6f442
...
...
@@ -9,6 +9,7 @@ import * as fs from 'fs';
import
*
as
path
from
'
path
'
;
import
*
as
os
from
'
os
'
;
import
*
as
cp
from
'
child_process
'
;
import
*
as
which
from
'
which
'
;
import
{
EventEmitter
}
from
'
events
'
;
import
iconv
=
require
(
'
iconv-lite
'
);
import
*
as
filetype
from
'
file-type
'
;
...
...
@@ -124,10 +125,17 @@ function findSystemGitWin32(base: string, onLookup: (path: string) => void): Pro
return
findSpecificGit
(
path
.
join
(
base
,
'
Git
'
,
'
cmd
'
,
'
git.exe
'
),
onLookup
);
}
function
findGitWin32InPath
(
onLookup
:
(
path
:
string
)
=>
void
):
Promise
<
IGit
>
{
const
whichPromise
=
new
Promise
<
string
>
((
c
,
e
)
=>
which
(
'
git.exe
'
,
(
err
,
path
)
=>
err
?
e
(
err
)
:
c
(
path
)));
return
whichPromise
.
then
(
path
=>
findSpecificGit
(
path
,
onLookup
));
}
function
findGitWin32
(
onLookup
:
(
path
:
string
)
=>
void
):
Promise
<
IGit
>
{
return
findSystemGitWin32
(
process
.
env
[
'
ProgramW6432
'
]
as
string
,
onLookup
)
.
then
(
void
0
,
()
=>
findSystemGitWin32
(
process
.
env
[
'
ProgramFiles(x86)
'
]
as
string
,
onLookup
))
.
then
(
void
0
,
()
=>
findSystemGitWin32
(
process
.
env
[
'
ProgramFiles
'
]
as
string
,
onLookup
));
.
then
(
void
0
,
()
=>
findSystemGitWin32
(
process
.
env
[
'
ProgramFiles
'
]
as
string
,
onLookup
))
.
then
(
void
0
,
()
=>
findSystemGitWin32
(
path
.
join
(
process
.
env
[
'
LocalAppData
'
]
as
string
,
'
Programs
'
),
onLookup
))
.
then
(
void
0
,
()
=>
findGitWin32InPath
(
onLookup
));
}
export
function
findGit
(
hint
:
string
|
undefined
,
onLookup
:
(
path
:
string
)
=>
void
):
Promise
<
IGit
>
{
...
...
extensions/git/yarn.lock
浏览文件 @
85f6f442
...
...
@@ -26,6 +26,10 @@
version "7.0.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
"@types/which@^1.0.28":
version "1.0.28"
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
applicationinsights@0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-0.18.0.tgz#162ebb48a383408bc4de44db32b417307f45bbc1"
...
...
@@ -123,6 +127,10 @@ inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
json3@3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
...
...
@@ -238,6 +246,12 @@ vscode-nls@2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
which@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
dependencies:
isexe "^2.0.0"
winreg@1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/winreg/-/winreg-1.2.3.tgz#93ad116b2696da87d58f7265a8fcea5254a965d5"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录