fix(plugins): Export child_process.spawn from plugins and use plugins.spawn in spawnPath to remove direct require and unify process spawning
This commit is contained in:
@@ -159,8 +159,6 @@ export const spawnPath = (
|
||||
fromFileUrl?: string | URL,
|
||||
options?: ISpawnOptions
|
||||
): ITsrunChildProcess => {
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
// 1. Resolve path (similar to runPath)
|
||||
const resolvedPath = fromFileUrl
|
||||
? plugins.path.join(
|
||||
@@ -192,7 +190,7 @@ export const spawnPath = (
|
||||
};
|
||||
|
||||
// 4. Spawn child process
|
||||
const child = spawn(process.execPath, args, spawnOptions);
|
||||
const child = plugins.spawn(process.execPath, args, spawnOptions);
|
||||
|
||||
// 5. Set up timeout if provided
|
||||
let timeoutId: NodeJS.Timeout | undefined;
|
||||
|
Reference in New Issue
Block a user