@jojonax/codex-copilot 1.6.0 → 1.6.1
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/package.json +1 -1
- package/src/utils/git.js +6 -1
- package/src/utils/github.js +4 -1
- package/src/utils/provider.js +3 -0
package/package.json
CHANGED
package/src/utils/git.js
CHANGED
|
@@ -219,7 +219,12 @@ export function commitAll(cwd, message) {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
function shellEscape(str) {
|
|
222
|
-
|
|
222
|
+
if (process.platform === 'win32') {
|
|
223
|
+
// Windows cmd.exe uses double quotes; escape internal double quotes
|
|
224
|
+
return `"${str.replace(/"/g, '\\"')}"`;
|
|
225
|
+
}
|
|
226
|
+
// Unix: single quotes, escape embedded single quotes
|
|
227
|
+
return `'${str.replace(/'/g, "'\\''")}'`;
|
|
223
228
|
}
|
|
224
229
|
|
|
225
230
|
/**
|
package/src/utils/github.js
CHANGED
|
@@ -41,7 +41,10 @@ function ghJSONSafe(cmd, cwd) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function shellEscape(str) {
|
|
44
|
-
|
|
44
|
+
if (process.platform === 'win32') {
|
|
45
|
+
return `"${str.replace(/"/g, '\\"')}"`;
|
|
46
|
+
}
|
|
47
|
+
return `'${str.replace(/'/g, "'\\''")}'`;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/**
|
package/src/utils/provider.js
CHANGED