Skip to content

Commit

Permalink
Add GIT_TERMINAL_PROMPT=0 to DVC environment variables (#3779)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Apr 29, 2023
1 parent b7a6e32 commit 496d2d7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions extension/src/cli/dvc/executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const mockedGetProcessEnv = jest.mocked(getProcessEnv)
const mockedEnv = {
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH: '/some/special/path'
}

Expand Down
8 changes: 7 additions & 1 deletion extension/src/cli/dvc/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ describe('executeDvcProcess', () => {
expect(mockedCreateProcess).toHaveBeenCalledWith({
args,
cwd,
env: { ...processEnv, DVCLIVE_OPEN: 'false', DVC_NO_ANALYTICS: 'true' },
env: {
...processEnv,
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0'
},
executable: 'dvc'
})
})
Expand Down Expand Up @@ -129,6 +134,7 @@ describe('executeDvcProcess', () => {
env: {
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH: joinEnvPath('/some/path/to', existingPath),
SECRET_KEY
},
Expand Down
3 changes: 3 additions & 0 deletions extension/src/cli/dvc/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const mockedPATH = '/some/special/path'
const mockedEnv = {
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH: mockedPATH
}
const mockedGetProcessEnv = jest.mocked(getProcessEnv)
Expand Down Expand Up @@ -42,6 +43,7 @@ describe('getOptions', () => {
env: {
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH: joinEnvPath(join('path', 'to', 'python', '.venv'), mockedPATH)
},
executable: pythonBinPath
Expand All @@ -58,6 +60,7 @@ describe('getOptions', () => {
env: {
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH: joinEnvPath(join('path', 'to', 'python', '.venv'), mockedPATH)
},
executable: cliPath
Expand Down
1 change: 1 addition & 0 deletions extension/src/cli/dvc/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const getEnv = (pythonBinPath?: string): NodeJS.ProcessEnv => {
...env,
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH
}
}
Expand Down
1 change: 1 addition & 0 deletions extension/src/cli/dvc/reader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const mockedGetProcessEnv = jest.mocked(getProcessEnv)
const mockedEnv = {
DVCLIVE_OPEN: 'false',
DVC_NO_ANALYTICS: 'true',
GIT_TERMINAL_PROMPT: '0',
PATH: '/all/of/the/goodies:/in/my/path'
}
const JSON_FLAG = '--json'
Expand Down

0 comments on commit 496d2d7

Please sign in to comment.