dbt ls should return a zero exit code when no models are selected #2886
Labels
bug
Something isn't working
good_first_issue
Straightforward + self-contained changes, good for new contributors!
Describe the bug
dbt ls
returns an exit code of1
when no models are selected.Steps To Reproduce
Run
dbt ls
with a model selector which returns no models, e.g.my_model,config.materialized:incremental
wheremy_model
is not incremental.Expected behavior
I'd expect a warning message, and an exit code of
0
.--warn-error
could be used to opt back in to the current behaviour.Log output
JSON (separate run):
System information
Which database are you using dbt with?
n/a
The output of
dbt --version
:The operating system you're using:
n/a
The output of
python --version
:n/a
Additional context
We're using this to programatically inspect the DBT graph and would expect an empty list rather than an error here. An error means we need to either string match against the output or ignore any errors, neither of which are desirable.
Slack thread I raised this in: https://getdbt.slack.com/archives/CJARVS0RY/p1605206141123400
The text was updated successfully, but these errors were encountered: