melos
melos copied to clipboard
fix: improper errored exit code propagation
Is there an existing issue for this?
- [X] I have searched the existing issues.
Version
3.0.1
Description
When a command is run for a set of packages with the exec option, if the command exits with a non-zero code, the melos CLI does not propagate the failure result with an errored exit code.
Steps to reproduce
- In a mono-repo with at least two packages.
- Create the
melos.yamlfile with the basic Melos setup. - Define the following script:
should-fail: description: A script that should fail. run: dart run absent_file.dart exec: concurrency: 1 failFast: true packageFilters: scope: "*" - Run
melos run should-fail --no-select.
Expected behavior
When running melos run should-fail, Melos should stop the whole execution with an errored exit code.
Given that the absent_file.dart file does not exist, the actual Melos execution workflow is interrupted in the first package but Melos ends up printing a SUCCESS message.
Screenshots
Additional context and comments
- OS: Windows
- Dart: 3.0.0
- Terminal: Git Bash
I have the same issue. Would be good if this can be fixed. It also happens on macOS.