whatever, let's vibe coding
This commit is contained in:
10
lib/ai-generated.ts
Normal file
10
lib/ai-generated.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {spawn} from 'child_process';
|
||||
import {readFileSync} from 'node:fs';
|
||||
|
||||
export function runInBackground(command: string, args?: string[]) {
|
||||
const proc = spawn(command, args ?? [], {detached: true, stdio: 'ignore'});
|
||||
proc.unref();
|
||||
return proc.pid;
|
||||
}
|
||||
|
||||
export const getStdin = () => readFileSync(0, 'utf8');
|
||||
Reference in New Issue
Block a user