Fix: Enable exception mode to skip scripts on first error
Replaces https://github.com/danger/danger-js/pull/1254
Noticed that "danger:prepush" ran commands with ";" rather "&&" meaning the next command is still executed if the previous one failed. This resulted in very weird errors due to the previous step failure.
Now, aborts of first error:
➜ yarn danger:prepush
yarn run v1.22.17
$ set -e; yarn build:fast; yarn test:fixtures; node distribution/commands/danger.js local --base main --dangerfile dangerfile.lite.ts
$ tsc -p tsconfig.production.json
source/commands/ci/runner.ts:70:30 - error TS2339: Property 'publishCheck' does not exist on type 'SharedCLI'.
...
➜
I'm wary about this breaking on Windows - have you tried it there? The CI doesn't look to be running any of these commands
Using "; " separator is not new. Some scripts already used those. And I do not have any windows platform access.
Same problem in other projects in this organization:
- https://github.com/danger/peril/issues/502
Ersetzt#1254
Es wurde bemerkt, dass "danger:prepush" Befehle mit ";" anstelle von "&&" ausführte, was bedeutet, dass der nächste Befehl immer noch ausgeführt wird, wenn der vorherige fehlgeschlagen ist. Dies führte zu sehr seltsamen Fehlern aufgrund des Fehlers des vorherigen Schritts.
Nun wird der erste Fehler abgebrochen:
➜ yarn danger:prepush yarn run v1.22.17 $ set -e; yarn build:fast; yarn test:fixtures; node distribution/commands/danger.js local --base main --dangerfile dangerfile.lite.ts $ tsc -p tsconfig.production.json source/commands/ci/runner.ts:70:30 - error TS2339: Property 'publishCheck' does not exist on type 'SharedCLI'. ... ➜
@Jimimaku English please.
@glensc I believe @Jimimaku is using some sort of native application, or browser extension, and it's barfing all over the GitHub repo. I think that's literally a translation of your issue summary.
We may need to block Jimimaku from this repo if they don't stop polluting.