Skip to content

Commit

Permalink
Fix cjs bootstrapping script
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 23, 2019
1 parent 267e0a4 commit ca8938c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bin/yuml2svg.cjs
Expand Up @@ -6,15 +6,13 @@ const { join } = require("path");
const FLAG = "--experimental-modules";
const ACTUAL_MODULE_PATH = join(__dirname, "yuml2svg");

const subprocess = spawn(process.argv0, [FLAG, ACTUAL_MODULE_PATH], {
const options = [FLAG, ACTUAL_MODULE_PATH].concat(process.argv.slice(2));

const subprocess = spawn(process.argv0, options, {
windowsHide: true,
stdio: "pipe",
stdio: "inherit",
});

process.stdin.pipe(subprocess.stdin);
subprocess.stderr.pipe(process.stderr);
subprocess.stdout.pipe(process.stdout);

subprocess.on("error", console.error);
subprocess.on("exit", code => {
process.exit(code || 0);
Expand Down

0 comments on commit ca8938c

Please sign in to comment.