diff --git a/gulpfile.js b/gulpfile.js index 26cb3411..cd600ad6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,8 +6,8 @@ const { src, dest , series} = require('gulp'); const fs = require('fs'); const fsPromises = require('fs').promises; -async function create_command(command) { - command = command.split(" ") +async function create_command(command_str) { + var command = command_str.split(" ") console.log(command[0], command.slice(1)) const child = spawn(command[0], command.slice(1)); @@ -24,9 +24,14 @@ async function create_command(command) { }); //wait until child closes to continue - await new Promise( (resolve) => { + var value = await new Promise( (resolve) => { child.on('close', resolve) + return "test" }) + if (value != 0) { + throw new Error(`FAILED TO RUN ${command_str} \n see above for stacktrace`); + } + console.log(value) } function process_CLI(cb) { diff --git a/package-lock.json b/package-lock.json index 0f2265c9..843300a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1040,7 +1040,7 @@ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": {