2023-08-14 14:04:35 +08:00
|
|
|
const os = require("os")
|
|
|
|
const { existsSync } = require("fs")
|
|
|
|
let skipDownload = false
|
|
|
|
let executablePath
|
|
|
|
if (process.platform == "win32" && existsSync("C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe")) {
|
|
|
|
skipDownload = true
|
|
|
|
executablePath = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
|
|
} else if (process.platform == "linux" && existsSync("/usr/bin/chromium")) {
|
|
|
|
skipDownload = true
|
|
|
|
executablePath = "/usr/bin/chromium"
|
2023-06-29 10:41:02 +08:00
|
|
|
}
|
2023-08-14 14:04:35 +08:00
|
|
|
module.exports = { skipDownload, executablePath }
|