Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when 'dbt ls' returns an empty list in output #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Christoffersn
Copy link

For some dbt projects the 'dbt ls --output json' command will return lines that are not json dictionaries, but lists (in my case an empty list []).

This changes skips all non-dictionary lines during the parsing, and prevents crashing when trying to access the dictionary values.

@nicogelders
Copy link
Contributor

nicogelders commented Jan 29, 2024

Hey, thanks for the PR, could you add a test case for this? Or give me a way to reproduce the issue.

@Christoffersn
Copy link
Author

Hey, thanks for the PR, could you add a test case for this? Or give me a way to reproduce the issue.

Sure! I'll get to it later this week :-)

… only tests where all dependencies are guaranteed to have been run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants