Description
Introduction
There are times when one would like to use --exec
even when the build fails. As an example, imagine running
stack build ... --exec 'do-stuff-with-error-messages-on-stdout.sh input.txt' --file-watch"
. In this scenario, we want to process the stdout that was generated every time --file-watch
causes a rebuild.
With the current --exec
flag implementation, that shell script would only run on a successful build. Yet since it is doing something with the error messages, it would be useful to have it run even on failure as that would ultimately help the programmer make the build succeed in this case.
Proposal
The proposal is a new flag --exec-always
that can execute even if the build fails and also while the --file-watch
flag has been passed. This would go a long way to helping people build their own tooling workflows around stack
.