@kaitranntt/ccs 2.4.8 → 2.4.9
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/VERSION +1 -1
- package/bin/ccs.js +26 -6
- package/lib/ccs +1 -1
- package/lib/ccs.ps1 +1 -1
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.9
|
package/bin/ccs.js
CHANGED
|
@@ -11,14 +11,34 @@ const { getSettingsPath, getConfigPath } = require('./config-manager');
|
|
|
11
11
|
// Version (sync with package.json)
|
|
12
12
|
const CCS_VERSION = require('../package.json').version;
|
|
13
13
|
|
|
14
|
+
// Helper: Escape arguments for shell execution
|
|
15
|
+
function escapeShellArg(arg) {
|
|
16
|
+
// Windows: escape double quotes and wrap in double quotes
|
|
17
|
+
return '"' + String(arg).replace(/"/g, '""') + '"';
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
// Execute Claude CLI with unified spawn logic
|
|
15
21
|
function execClaude(claudeCli, args) {
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
const isWindows = process.platform === 'win32';
|
|
23
|
+
const needsShell = isWindows && /\.(cmd|bat|ps1)$/i.test(claudeCli);
|
|
24
|
+
|
|
25
|
+
let child;
|
|
26
|
+
if (needsShell) {
|
|
27
|
+
// When shell needed: concatenate into string to avoid DEP0190 warning
|
|
28
|
+
const cmdString = [claudeCli, ...args].map(escapeShellArg).join(' ');
|
|
29
|
+
child = spawn(cmdString, {
|
|
30
|
+
stdio: 'inherit',
|
|
31
|
+
windowsHide: true,
|
|
32
|
+
shell: true
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
// When no shell needed: use array form (faster, no shell overhead)
|
|
36
|
+
child = spawn(claudeCli, args, {
|
|
37
|
+
stdio: 'inherit',
|
|
38
|
+
windowsHide: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
22
42
|
child.on('exit', (code, signal) => {
|
|
23
43
|
if (signal) process.kill(process.pid, signal);
|
|
24
44
|
else process.exit(code || 0);
|
package/lib/ccs
CHANGED
package/lib/ccs.ps1
CHANGED
|
@@ -134,7 +134,7 @@ function Show-Help {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
# Version (updated by scripts/bump-version.sh)
|
|
137
|
-
$CcsVersion = "2.4.
|
|
137
|
+
$CcsVersion = "2.4.9"
|
|
138
138
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
139
139
|
$ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" }
|
|
140
140
|
|