nhatlong90 bd19ab9070
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>
2026-09-01 01:13:07 +07:00

19 lines
429 B
JavaScript

#!/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);