skills-x 0.2.22 → 0.2.24
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.
|
Binary file
|
|
Binary file
|
package/bin/skills-x-linux-amd64
CHANGED
|
Binary file
|
package/bin/skills-x-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/skills-x.js
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
2
3
|
|
|
3
|
-
const {
|
|
4
|
+
const { execFileSync } = require('child_process');
|
|
4
5
|
const path = require('path');
|
|
5
|
-
const
|
|
6
|
+
const os = require('os');
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const binaryName = isWindows ? 'skills-x.exe' : 'skills-x';
|
|
10
|
-
const binaryPath = path.join(__dirname, binaryName);
|
|
8
|
+
const ext = os.platform() === 'win32' ? '.exe' : '';
|
|
9
|
+
const binary = path.join(__dirname, 'skills-x' + ext);
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
console.error('Try reinstalling:');
|
|
17
|
-
console.error(' npm uninstall -g skills-x && npm install -g skills-x');
|
|
18
|
-
console.error('');
|
|
19
|
-
console.error('Or install via Go:');
|
|
20
|
-
console.error(' go install github.com/anthropics/skills-x/cmd/skills-x@latest');
|
|
21
|
-
process.exit(1);
|
|
11
|
+
try {
|
|
12
|
+
execFileSync(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
13
|
+
} catch (e) {
|
|
14
|
+
process.exit(e.status || 1);
|
|
22
15
|
}
|
|
23
|
-
|
|
24
|
-
// Run the binary with all arguments
|
|
25
|
-
const args = process.argv.slice(2);
|
|
26
|
-
const child = spawn(binaryPath, args, {
|
|
27
|
-
stdio: 'inherit',
|
|
28
|
-
env: process.env,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
child.on('error', (err) => {
|
|
32
|
-
console.error('Failed to start skills-x:', err.message);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
child.on('exit', (code) => {
|
|
37
|
-
process.exit(code || 0);
|
|
38
|
-
});
|