This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { spawn } from 'node:child_process';
|
||||
import { createBrowserInstallCommand } from "./lib/browser-install.js";
|
||||
const { command, args } = createBrowserInstallCommand(process.argv.slice(2));
|
||||
const child = spawn(command, args, { stdio: 'inherit' });
|
||||
child.once('error', (error) => {
|
||||
console.error(`无法启动 Chromium 安装程序:${error.message}`);
|
||||
process.exitCode = 1;
|
||||
});
|
||||
child.once('exit', (code, signal) => {
|
||||
if (signal) {
|
||||
process.kill(process.pid, signal);
|
||||
return;
|
||||
}
|
||||
process.exitCode = code ?? 1;
|
||||
});
|
||||
//# sourceMappingURL=install-browser.js.map
|
||||
Reference in New Issue
Block a user