@cccarv82/freya 3.8.1 → 3.8.2
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/cli/retroactive-ingest.js +10 -8
- package/cli/web.js +10 -11
- package/package.json +1 -1
|
@@ -34,14 +34,16 @@ function run(cmd, args, cwd, extraEnv) {
|
|
|
34
34
|
const env = extraEnv ? { ...process.env, ...extraEnv } : process.env;
|
|
35
35
|
try {
|
|
36
36
|
if (process.platform === 'win32') {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
// If we have a full path to the executable, use it directly with spawn
|
|
38
|
+
// (no shell needed — avoids PowerShell argument mangling).
|
|
39
|
+
// Only fall back to cmd.exe for bare command names.
|
|
40
|
+
if (path.isAbsolute(cmd) || cmd.includes('\\') || cmd.includes('/')) {
|
|
41
|
+
child = spawn(cmd, args, { cwd, env, windowsHide: true });
|
|
42
|
+
} else {
|
|
43
|
+
// Bare command name — use cmd.exe to resolve from PATH
|
|
44
|
+
const comspec = process.env.ComSpec || 'cmd.exe';
|
|
45
|
+
child = spawn(comspec, ['/d', '/s', '/c', cmd, ...args], { cwd, shell: false, env });
|
|
46
|
+
}
|
|
45
47
|
} else {
|
|
46
48
|
child = spawn(cmd, args, { cwd, shell: true, env });
|
|
47
49
|
}
|
package/cli/web.js
CHANGED
|
@@ -971,17 +971,16 @@ function run(cmd, args, cwd, extraEnv, stdinData) {
|
|
|
971
971
|
|
|
972
972
|
try {
|
|
973
973
|
if (process.platform === 'win32') {
|
|
974
|
-
//
|
|
975
|
-
//
|
|
976
|
-
//
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
], { cwd, env, windowsHide: true });
|
|
974
|
+
// getCopilotCmd() resolves the full path via PowerShell/where.
|
|
975
|
+
// Once we have the full path, spawn directly — no shell needed.
|
|
976
|
+
// This avoids PowerShell argument mangling issues.
|
|
977
|
+
if (path.isAbsolute(cmd) || cmd.includes('\\') || cmd.includes('/')) {
|
|
978
|
+
child = spawn(cmd, args, { cwd, env, windowsHide: true });
|
|
979
|
+
} else {
|
|
980
|
+
// Bare command name — use cmd.exe to resolve from PATH
|
|
981
|
+
const comspec = process.env.ComSpec || 'cmd.exe';
|
|
982
|
+
child = spawn(comspec, ['/d', '/s', '/c', cmd, ...args], { cwd, shell: false, env });
|
|
983
|
+
}
|
|
985
984
|
} else {
|
|
986
985
|
child = spawn(cmd, args, { cwd, shell: true, env });
|
|
987
986
|
}
|
package/package.json
CHANGED