Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function executePackageShellcode(locator: Locator, command: string, args: Array, {cwd, project, stdin, stdout, stderr}: ExecutePackageScriptOptions) {
const {binFolder, env, cwd: realCwd} = await initializePackageEnvironment(locator, {project, cwd});
try {
return await execute(command, args, {cwd: realCwd, env, stdin, stdout, stderr});
} finally {
await xfs.removePromise(binFolder);
}
}
const realExecutor = async () => {
return await execute(script, args, {cwd: realCwd, env, stdin, stdout, stderr});
};