'use strict';

const shell = require('shelljs');
const cmd = require('./cmd');

// Execute msbuild.exe with passed arguments
module.exports = function exec(args) {
    process.exit(shell.exec(cmd(args)).code);
}

@@ -165,21 +165,23 @@
     
-process.exit(
+const result = 
 shel
@@ -202,13 +202,211 @@
 s)).code
+;%0A    if (result !== 0) %7B%0A        console.log();%0A        console.log(%60MSBuild failed. ERRORLEVEL '$%7Bresult%7D'.'%60)%0A        process.exit(result);%0A    %7D%0A    console.log('MSBuild successfully completed.'
 );%0A%7D%0A

Fix handling of MSBuild errors