diff options
Diffstat (limited to 'typescript/builder.js')
-rw-r--r-- | typescript/builder.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/typescript/builder.js b/typescript/builder.js index d021fb2..8007615 100644 --- a/typescript/builder.js +++ b/typescript/builder.js @@ -12,7 +12,7 @@ fs.copyFileSync("./typescript/interface.ts", homedir + "/.kartik/build/kartik.ts cp = require('child_process').spawnSync(cmd, [ "./node_modules/typescript/bin/tsc", "--skipLibCheck", "--removeComments", "--sourceMap", "-m", "commonjs", "--target", "es6", homedir + "/.kartik/build/kartik.ts" ], { cwd: KartikRoot });
if (cp.status !== 0) {
- console.error(cp.stdout.toString());
+ try { console.error(cp.stdout.toString()); } catch (e) {}
throw new Error("Subprocess exited with code " + cp.status);
}
@@ -47,4 +47,4 @@ module.exports = (source, destination) => { lines = fs.readFileSync(destination.substr(0, destination.length - 6) + ".js").toString().split("\n");
lines[1] = "";
fs.writeFileSync(destination.substr(0, destination.length - 6) + ".js", lines.join("\n"));
-}
\ No newline at end of file +}
|