This website works better with JavaScript.
Home
Explore
帮助
返回水杉在线
登录水杉在线
登录水杉码园
wlxsp
/
test1
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Adds GCM env vars to protect credentials
main
Eric Amodio
7 years ago
parent
86c413081d
commit
bebe0c2d9b
1 changed files
with
3 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-1
src/git/git.ts
+ 3
- 1
src/git/git.ts
View File
@ -69,7 +69,9 @@ async function gitCommandCore(options: GitCommandOptions, ...args: any[]): Promi
const
opts
=
{
encoding
:
'utf8'
,
.
.
.
options
}
;
const
s
=
await
spawnPromise
(
git
.
path
,
args
,
{
cwd
:
options.cwd
,
env
:
options.env
||
process
.
env
,
// Adds GCM environment variables to avoid any possible credential issues -- from https://github.com/Microsoft/vscode/issues/26573#issuecomment-338686581
// Shouldn't *really* be needed but better safe than sorry
env
:
{
.
.
.
(
options
.
env
||
process
.
env
)
,
GCM_INTERACTIVE
:
'NEVER'
,
GCM_PRESERVE_CREDS
:
'TRUE'
}
,
encoding
:
(
opts
.
encoding
===
'utf8'
)
?
'utf8'
:
'binary'
}
as
SpawnOptions
)
;
Write
Preview
Loading…
Cancel
Save