diff --git a/run/run.node.ts b/run/run.node.ts index 3b7a15860a..6ee4cda2c8 100644 --- a/run/run.node.ts +++ b/run/run.node.ts @@ -35,7 +35,9 @@ namespace $ { command: args_raw.join(' ') , dir: $node.path.relative( '' , dir ) , }) - return this.$mol_run_spawn_sync(app, args, { shell: true, cwd: dir, env }) + const res = this.$mol_run_spawn_sync(app, args, { shell: true, cwd: dir, env }); + if( res.status ) $mol_fail( new Error( res.stderr.toString() || 'Exit(' + res.status + ')' ) ) + return res } const sub = this.$mol_run_spawn(app, args, {