mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-22 19:39:31 +08:00
15 lines
449 B
JavaScript
15 lines
449 B
JavaScript
"use strict"
|
|||
|
|
|
||
|
|
/** CI / 无桌面需求时设为 1,可跳过 Chromium 下载 */
|
||
|
|
if (process.env.ELECTRON_SKIP_BINARY_DOWNLOAD === "1") {
|
||
|
|
process.exit(0)
|
||
|
|
}
|
||
|
|
|
||
|
|
const { execSync } = require("child_process")
|
||
|
|
const fs = require("fs")
|
||
|
|
const path = require("path")
|
||
|
|
|
||
|
|
const installScript = path.join(__dirname, "..", "node_modules", "electron", "install.js")
|
||
|
|
if (fs.existsSync(installScript)) {
|
||
|
|
execSync(`node "${installScript}"`, { stdio: "inherit" })
|
||
|
|
}
|