diff --git a/vscode-dotnet-runtime-library/src/Utils/CommandExecutor.ts b/vscode-dotnet-runtime-library/src/Utils/CommandExecutor.ts index 4f78fb0176..58fdf3dc13 100644 --- a/vscode-dotnet-runtime-library/src/Utils/CommandExecutor.ts +++ b/vscode-dotnet-runtime-library/src/Utils/CommandExecutor.ts @@ -451,12 +451,18 @@ ${stderr}`)); options.env.DOTNET_CLI_UI_LANGUAGE ??= 'en-US'; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access options.env.DOTNET_NOLOGO ??= 'true'; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + options.env.NO_COLOR ??= '1'; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + options.env.TERM ??= 'dumb'; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + options.env.GREP_OPTIONS = undefined; } else { options = { cwd: path.resolve(__dirname), shell: true, encoding: 'utf8', env: - { ...process.env, DOTNET_CLI_UI_LANGUAGE: 'en-US', DOTNET_NOLOGO: 'true' } + { ...process.env, DOTNET_CLI_UI_LANGUAGE: 'en-US', DOTNET_NOLOGO: 'true', NO_COLOR: '1', TERM: 'dumb', GREP_OPTIONS: undefined } }; } diff --git a/vscode-dotnet-runtime-library/src/Utils/TypescriptUtilities.ts b/vscode-dotnet-runtime-library/src/Utils/TypescriptUtilities.ts index 8caf77ff58..83b5371ca9 100644 --- a/vscode-dotnet-runtime-library/src/Utils/TypescriptUtilities.ts +++ b/vscode-dotnet-runtime-library/src/Utils/TypescriptUtilities.ts @@ -120,6 +120,8 @@ const possiblyUsefulUpperCaseEnvVars = new Set([ // This is a local vari 'PWD', 'BASHOPTS', 'SHELLOPTS', + 'GREP_OPTIONS', + 'NO_COLOR', 'PS1', 'PS2', 'DOTNET_INSTALL_TOOL_UNDER_TEST',