import { spawn } from 'child_process';
import { getBinaryPath } from './utils.js';
async function main() {
try {
const binaryPath = await getBinaryPath();
const args = process.argv.slice(2);
const probeProcess = spawn(binaryPath, args, {
stdio: 'inherit' });
probeProcess.on('close', (code) => {
process.exit(code);
});
probeProcess.on('error', (error) => {
console.error(`Error executing probe binary: ${error.message}`);
process.exit(1);
});
} catch (error) {
console.error(`Error: ${error.message}`);
process.exit(1);
}
}
main().catch(error => {
console.error(`Unexpected error: ${error.message}`);
process.exit(1);
});