Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shell): non-ASCII Windows PATH entries survive the PowerShell environment probe #37154

Mergedlowlyleon(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/37154/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 29 additions and 0 deletions (loading 1).

x
0 of 4 viewed, 4 left
9 additions and 0 deletionsapps/desktop/src/shell/DesktopShellEnvironment.test.tsModified
View file
@@ -983,11 +983,13 @@
USERPROFILE: "C:\\Users\\testuser",
​
+ const scripts: Array<string> = [];
const prepared = yield* runShellEnvironment({
env,
platform: "win32",
handler: (command) => {
if (command._tag !== "StandardCommand") return "";
+ scripts.push(String(command.args.at(-1)));
const loadProfile = !command.args.includes("-NoProfile");
return loadProfile
? envOutput({
@@ -1021,6 +1023,13 @@
env.FNM_MULTISHELL_PATH,
"C:\\Users\\testuser\\AppData\\Local\\fnm_multishells\\123",
+ assert.isNotEmpty(scripts);
+ for (const script of scripts) {
+ assert.include(
+ script,
+ "[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)",
+ );
+ }