Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/axiomcode/mcp/find-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function withPython(env, py) {
// Windows Python writes a pipe in the ANSI code page and opens files in it, so the first → in an answer raised
// UnicodeEncodeError, and a source file in UTF-8 read wrong. UTF-8 mode fixes both; a user's own setting stands.
if (process.platform === 'win32' && out.PYTHONUTF8 === undefined) out.PYTHONUTF8 = '1';
// Git Bash's runtime expands wildcards in the arguments a native Windows process hands it, since no shell did:
// `axiomcode path '*' X` reached the CLI as the working directory's file names. noglob turns that off for every
// bash below (the CLI's, the MCP server's, the hooks'); other MSYS options a user set are kept.
if (process.platform === 'win32' && !/(^|\s)noglob(\s|$)/.test(out.MSYS || '')) out.MSYS = ((out.MSYS || '') + ' noglob').trim();
if (process.platform !== 'win32' && py.cmd.length === 1 && py.cmd[0] === 'python3') return out;
// Windows keeps it as Path, and a second PATH key beside it would be one of two the child picks from.
const key = Object.keys(out).find((k) => k.toUpperCase() === 'PATH') || 'PATH';
Expand Down
Loading