mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 07:36:12 +08:00
[dev] use .cmd versions for Windows
Since spawn on Windows can't accept scripts like exec can :(
This commit is contained in:
parent
fc3dde9111
commit
67b7a335de
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,9 @@ const npmEnvs = {
|
|||
|
||||
async function npm(cmd, options) {
|
||||
const {cwd, env} = Object.assign({cwd: '.', env: 'system'}, options);
|
||||
await spawn("npm", [cmd], {
|
||||
let npmCmd = "npm"
|
||||
if (process.platform === "win32") { npmCmd = "npm.cmd" }
|
||||
await spawn(npmCmd, [cmd], {
|
||||
cwd: path.resolve(__dirname, '..', cwd),
|
||||
env: npmEnvs[env],
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue