mirror of
https://github.com/GitFrog1111/badclaude.git
synced 2026-05-26 18:37:50 +02:00
3deaabfaa6
Made-with: Cursor
27 lines
560 B
JavaScript
27 lines
560 B
JavaScript
#!/usr/bin/env node
|
|
const path = require('path');
|
|
const { spawn } = require('child_process');
|
|
|
|
let electronBinary;
|
|
try {
|
|
electronBinary = require('electron');
|
|
} catch (e) {
|
|
console.error('Could not load Electron. Try: npm install -g badclaude');
|
|
process.exit(1);
|
|
}
|
|
|
|
const appPath = path.resolve(__dirname, '..');
|
|
|
|
const child = spawn(electronBinary, [appPath], {
|
|
detached: true,
|
|
stdio: 'ignore',
|
|
windowsHide: true,
|
|
});
|
|
|
|
child.on('error', (err) => {
|
|
console.error('Failed to start badclaude:', err.message);
|
|
process.exit(1);
|
|
});
|
|
|
|
child.unref();
|