From b098cc684f2500aa2a1a809ef36919d2104f2488 Mon Sep 17 00:00:00 2001 From: jiangfeng Date: Mon, 15 Jul 2019 17:20:19 +0800 Subject: [PATCH] fix(nightmare.js): Fixed the problem that nightmare could not be executed after packaging on win32 platform --- .gitignore | 3 ++- .vscode/settings.json | 4 ++++ lib/nightmare.js | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index e3f88994..68453e74 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules .DS_Store test/tmp test/DevTools Extensions -.idea \ No newline at end of file +.idea +.vscode \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..26f9dd5d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "eslint.autoFixOnSave": false, + "editor.formatOnSave": false +} \ No newline at end of file diff --git a/lib/nightmare.js b/lib/nightmare.js index d4d02ab9..e2f21075 100644 --- a/lib/nightmare.js +++ b/lib/nightmare.js @@ -136,7 +136,8 @@ function Nightmare(options) { [runner].concat(JSON.stringify(electronArgs)), { stdio: [null, null, null, 'ipc'], - env: defaults(options.env || {}, process.env) + env: defaults(options.env || {}, process.env), + shell: !/^win/.test(process.platform) } )