guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
138 stars 7 forks source link

Stop multiline scripts on failure #64

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

It could be useful to have an option to stop multiline scripts if any given line fails.

In powershell this is done with $ErrorActionPreference = "Stop";

In bash, with set -eu.

One problem is that native executions in powershell still pass, but perhaps that is an allowable compat subset to at least get close to the desired behaviour.

This could either be an environment variable like CHOMP_CMD_STOP_ON_ERR = '1' or a direct field on the task.