Ability to aggregate errors from multiple commands
- Dominant language
- Rust
- Stars
- 35.8k
- Forks
- 846
- Avg merge
- 27m
- Merged PRs (30d)
- 3
Description
Is there some way to have just run all the commands in a recipe, regardless of exit code, and then exit with with 0 or 1 at the end depending on if all commands succeeded or not?
One use case is to be able to run multiple linters and have all of them produce their respective report, even if one of them fails.
For example, in the following code, if a-linter fails, b-linter and c-linter will not run.
```
lint:
cd a && a-linter
cd b && b-linter
cd c && c-linter
```
This can of course be handled in a separate tool / language, but would be cool if this was built in.
Like this example implementation in Bash.
```
lint:
#!/usr/bin/env bash
code=0
root=$(pwd)
cd $root/a && a-linter
code=$(($code || $? ? 1 : 0))
cd $root/b && b-linter
code=$(($code || $? ? 1 : 0))
cd $root/c && c-linter
code=$(($code || $? ? 1 : 0))
exit $code
```
Contributor guide
Research direction
No implementation files or tests are named. Start by tracing just's existing recipe execution and exit-status handling, then compare the available recipe syntax with the Bash example; done means multiple commands run despite earlier failures and the recipe reports failure if any command failed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100