fix(cli): support cross-platform python execution on windows (#462)

- replaced hardcoded python3 in npm scripts with a node wrapper to support windows natively without breaking unix systems

- updated stale catalog-summary.json snapshot

Co-authored-by: khietan <118370929+khietan@users.noreply.github.com>
This commit is contained in:
nhatlong90
2026-09-01 01:13:07 +07:00
committed by GitHub
co-authored by khietan
parent c7d413e7c3
commit bd19ab9070
3 changed files with 31 additions and 13 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env node
import { spawnSync } from 'node:child_process';
import { platform } from 'node:os';
const cmd = platform() === 'win32' ? 'python' : 'python3';
const args = process.argv.slice(2);
const result = spawnSync(cmd, args, {
stdio: 'inherit',
cwd: process.cwd()
});
if (result.error) {
console.error(`Failed to start ${cmd}: ${result.error.message}`);
process.exit(1);
}
process.exit(result.status ?? 0);