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); +});