diff --git a/extra/beta/update-version.js b/extra/beta/update-version.js index 506af1f01..240d44608 100644 --- a/extra/beta/update-version.js +++ b/extra/beta/update-version.js @@ -23,13 +23,13 @@ if (!exists) { // Also update package-lock.json const npm = /^win/.test(process.platform) ? "npm.cmd" : "npm"; - const resultVersion = childProcess.spawnSync(npm, ["--no-git-tag-version", "version", version]); + const resultVersion = childProcess.spawnSync(npm, ["--no-git-tag-version", "version", version], { shell: true }); if (resultVersion.error) { console.error(resultVersion.error); console.error("error npm version!"); process.exit(1); } - const resultInstall = childProcess.spawnSync(npm, ["install"]); + const resultInstall = childProcess.spawnSync(npm, ["install"], { shell: true }); if (resultInstall.error) { console.error(resultInstall.error); console.error("error update package-lock!"); diff --git a/extra/update-version.js b/extra/update-version.js index 2b89316f5..b88cce5ef 100644 --- a/extra/update-version.js +++ b/extra/update-version.js @@ -26,13 +26,13 @@ if (!exists) { // Also update package-lock.json const npm = /^win/.test(process.platform) ? "npm.cmd" : "npm"; - const resultVersion = childProcess.spawnSync(npm, ["--no-git-tag-version", "version", newVersion]); + const resultVersion = childProcess.spawnSync(npm, ["--no-git-tag-version", "version", newVersion], { shell: true }); if (resultVersion.error) { console.error(resultVersion.error); console.error("error npm version!"); process.exit(1); } - const resultInstall = childProcess.spawnSync(npm, ["install"]); + const resultInstall = childProcess.spawnSync(npm, ["install"], { shell: true }); if (resultInstall.error) { console.error(resultInstall.error); console.error("error update package-lock!");