olly-molly 0.3.73 → 0.3.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +6 -4
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -662,7 +662,7 @@ async function handleDevMode(config) {
|
|
|
662
662
|
const server = spawn(npxCmd, ['next', 'dev', '--port', config.PORT, '--hostname', config.HOST], {
|
|
663
663
|
cwd: config.APP_DIR,
|
|
664
664
|
stdio: 'inherit',
|
|
665
|
-
shell:
|
|
665
|
+
shell: process.platform === 'win32',
|
|
666
666
|
});
|
|
667
667
|
|
|
668
668
|
server.on('close', (code) => process.exit(code || 0));
|
|
@@ -965,18 +965,20 @@ async function main() {
|
|
|
965
965
|
}, 2000);
|
|
966
966
|
}
|
|
967
967
|
|
|
968
|
+
const isWindows = process.platform === 'win32';
|
|
969
|
+
|
|
968
970
|
let server;
|
|
969
971
|
if (usedPrebuilt) {
|
|
970
972
|
server = spawn('node', [standaloneServerPath], {
|
|
971
973
|
cwd: config.APP_DIR,
|
|
972
974
|
stdio: 'inherit',
|
|
973
975
|
env: { ...process.env, PORT: config.PORT, HOSTNAME: config.HOST },
|
|
974
|
-
shell:
|
|
976
|
+
shell: isWindows
|
|
975
977
|
});
|
|
976
978
|
} else {
|
|
977
|
-
const npxCmd =
|
|
979
|
+
const npxCmd = isWindows ? 'npx.cmd' : 'npx';
|
|
978
980
|
server = spawn(npxCmd, ['next', 'start', '--port', config.PORT, '--hostname', config.HOST], {
|
|
979
|
-
cwd: config.APP_DIR, stdio: 'inherit', shell:
|
|
981
|
+
cwd: config.APP_DIR, stdio: 'inherit', shell: isWindows
|
|
980
982
|
});
|
|
981
983
|
}
|
|
982
984
|
|