Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds a conditional check for os to keep extra windows from opening #284

Merged
merged 1 commit into from May 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/webpack-dashboard.js
Expand Up @@ -17,6 +17,7 @@ const pkg = require("../package.json");
const main = (module.exports = opts => {
opts = opts || {};
const argv = typeof opts.argv === "undefined" ? process.argv : opts.argv;
const isWindows = process.platform === "win32";

program.version(pkg.version);
program.option("-c, --color [color]", "Dashboard color");
Expand All @@ -43,7 +44,7 @@ const main = (module.exports = opts => {
child = spawn(command, args, {
env,
stdio: [null, null, null, null],
detached: true
detached: !isWindows
});
}

Expand Down Expand Up @@ -91,7 +92,7 @@ const main = (module.exports = opts => {
});

process.on("exit", () => {
process.kill(process.platform === "win32" ? child.pid : -child.pid);
process.kill(isWindows ? child.pid : -child.pid);
});
} else {
server.on("connection", socket => {
Expand Down