Skip to content

Commit

Permalink
Skip setting PYTHONUTF8 when activating terminals (microsoft#22213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj authored Oct 13, 2023
1 parent bdb8efb commit 76ae73a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,12 @@ function shouldPS1BeSet(type: PythonEnvType | undefined, env: EnvironmentVariabl
}

function shouldSkip(env: string) {
return ['_', 'SHLVL'].includes(env);
return [
'_',
'SHLVL',
// Even though this maybe returned, setting it can result in output encoding errors in terminal.
'PYTHONUTF8',
].includes(env);
}

function getPromptForEnv(interpreter: PythonEnvironment | undefined) {
Expand Down

0 comments on commit 76ae73a

Please sign in to comment.