Skip to content

Commit

Permalink
Prioritize git environment variables from parent process (#3885)
Browse files Browse the repository at this point in the history
  • Loading branch information
monder authored and kaylieEB committed Jul 12, 2017
1 parent df321cd commit 1de6ccc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/util/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ test('spawn', () => {
Git.spawn(['status']);

expect(spawnMock.calls[0][2].env).toMatchObject({
...process.env,
GIT_ASKPASS: '',
GIT_TERMINAL_PROMPT: 0,
GIT_SSH_COMMAND: 'ssh -oBatchMode=yes',
...process.env,
});
});
2 changes: 1 addition & 1 deletion src/util/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const supportsArchiveCache: {[key: string]: boolean} = map({

// Suppress any password prompts since we run these in the background
const env = {
...process.env,
GIT_ASKPASS: '',
GIT_TERMINAL_PROMPT: 0,
GIT_SSH_COMMAND: 'ssh -oBatchMode=yes',
...process.env,
};

// This regex is designed to match output from git of the style:
Expand Down

0 comments on commit 1de6ccc

Please sign in to comment.