@oxecli/oxe 1.0.73 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +13 -3
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -83,11 +83,21 @@ export const default_reasoning_effort = "low";
|
|
|
83
83
|
export function runtimeOsSummary() {
|
|
84
84
|
return `${os.platform()} ${os.release()} (${os.arch()}, Node ${process.version})`;
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* The shell that the bash tool actually launches: `spawn(cmd, { shell: true })`.
|
|
88
|
+
* On Windows Node uses %ComSpec% (cmd.exe by default); on POSIX it uses /bin/sh.
|
|
89
|
+
*/
|
|
90
|
+
export function detectedShell() {
|
|
91
|
+
if (process.platform === "win32") {
|
|
92
|
+
const comspec = process.env.ComSpec || process.env.COMSPEC;
|
|
93
|
+
return comspec ? path.basename(comspec) : "cmd.exe";
|
|
94
|
+
}
|
|
95
|
+
const shell = process.env.SHELL;
|
|
96
|
+
return shell ? path.basename(shell) : "sh";
|
|
97
|
+
}
|
|
86
98
|
export function osPrefix() {
|
|
87
|
-
const isWin = process.platform === "win32";
|
|
88
|
-
const shell = isWin ? "PowerShell / cmd.exe" : "POSIX sh";
|
|
89
99
|
return (`Running environment: ${runtimeOsSummary()}. ` +
|
|
90
|
-
`Shell commands run via ${
|
|
100
|
+
`Shell commands run via ${detectedShell()} ` +
|
|
91
101
|
"with `shell=True`; use commands, quoting, and path separators " +
|
|
92
102
|
"appropriate to this OS.\n\n");
|
|
93
103
|
}
|