Skip to content

Commit 6da0f6d

Browse files
committed
Add support for extracting environment from xonsh.
Closes microsoft#200374.
1 parent 9525bc1 commit 6da0f6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/platform/shell/node/shellEnv.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ async function doResolveUnixShellEnv(logService: ILogService, token: Cancellatio
137137
} else if (name === 'nu') { // nushell requires ^ before quoted path to treat it as a command
138138
command = `^'${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`;
139139
shellArgs = ['-i', '-l', '-c'];
140+
} else if (name === 'xonsh') { // #200374: xonsh expects escaping to avoid Python syntax
141+
command = `$['${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"']`;
142+
shellArgs = ['-i', '-l', '-c'];
140143
} else {
141144
command = `'${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`;
142145

0 commit comments

Comments
 (0)