From 0935ed41d48c5c072301afcdab8f797c2ac46704 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Wed, 12 Jul 2017 16:31:55 +0300 Subject: [PATCH] JS: return exit code from the NodeJs kotlinc-js wrapper --- js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js b/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js index be7e2ba38e8..6dd199b5fdd 100644 --- a/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js +++ b/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js @@ -20,4 +20,6 @@ var spawn = require('child_process').spawn; var execPath = __dirname + '/kotlinc-js'; var args = process.argv.slice(2); -spawn('"' + execPath + '"', args, { stdio: "inherit", shell: true }); +spawn('"' + execPath + '"', args, { stdio: "inherit", shell: true }).on('exit', function(exitCode) { + process.exit(exitCode); +});