escape shell

This commit is contained in:
Philip Peterson 2025-05-29 01:03:23 -07:00
parent 67a1056042
commit 4167d5a46d

View file

@ -2,6 +2,7 @@ const { execSync } = require("child_process");
const pkg = require("../package.json");
const path = require("path");
const pnp = require("pnpapi");
const shellescape = require('shell-escape');
const version = pkg.devDependencies.electron;
if (!version) {
@ -15,7 +16,7 @@ process.env.ELECTRON_CUSTOM_VERSION = version;
const downloadScript = pnp.resolveToUnqualified("electron-mksnapshot/download-mksnapshot.js", __filename);
const mkSnapshotScript = path.resolve(__dirname, "../bin/mk-snapshot.js");
execSync(`node ${downloadScript}`, {
execSync(shellescape(['node', downloadScript]), {
stdio: "inherit",
});
execSync(`node ${mkSnapshotScript}`, { stdio: "inherit" });
execSync(shellescape(['node', mkSnapshotScript]), { stdio: "inherit" });