Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Commit

Permalink
Merge pull request #227 from netlify/raees/terminal-clear-fix
Browse files Browse the repository at this point in the history
Don't allow child scripts to manipulate terminal
  • Loading branch information
jschatz1 authored Jul 29, 2019
2 parents 3de0ea2 + 24908b9 commit 7633428
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/commands/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,14 @@ function startDevServer(settings, log) {
const args =
settings.command === "npm" ? ["run", ...settings.args] : settings.args;
const ps = execa(settings.command, args, {
env: settings.env,
stdio: "inherit"
env: { ...settings.env, FORCE_COLOR: "true" },
stdio: ["inherit", "pipe", "pipe"]
});
ps.stdout.on("data", function(buffer) {
process.stdout.write(buffer.toString("utf8"));
});
ps.stderr.on("data", function(buffer) {
process.stderr.write(buffer.toString("utf8"));
});
ps.on("close", code => process.exit(code));
ps.on("SIGINT", process.exit);
Expand Down Expand Up @@ -318,7 +324,8 @@ DevCommand.flags = {
}),
port: flags.integer({
char: "p",
description: "port of netlify dev" }),
description: "port of netlify dev"
}),
dir: flags.string({
char: "d",
description: "dir with static files"
Expand Down

0 comments on commit 7633428

Please sign in to comment.