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

[Bug] Unexpected error message when git is not installed #9537

Open
2 tasks done
dbeatty10 opened this issue Feb 7, 2024 · 0 comments · May be fixed by #9578
Open
2 tasks done

[Bug] Unexpected error message when git is not installed #9537

dbeatty10 opened this issue Feb 7, 2024 · 0 comments · May be fixed by #9578
Labels
bug Something isn't working Medium Severity bug with minor impact that does not have resolution timeframe requirement

Comments

@dbeatty10
Copy link
Contributor

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

After upgrading macOS, I got the following output for dbt debug:

15:36:59  Running with dbt=1.7.5
15:36:59  dbt version: 1.7.5
...
15:37:00  Configuration:
15:37:00    profiles.yml file [OK found and valid]
15:37:00    dbt_project.yml file [OK found and valid]
15:37:00  Required dependencies:
15:37:00  Encountered an error:
Got a non-zero returncode running: ['/usr/bin/git', '--help']

Running git --help helped point to the underlying issue -- need to reinstall git via xcode!

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Solution:

xcode-select --install

Expected Behavior

Based on the code here, I would have expected a different error message that looked like this:

15:37:00  Encountered an error:
Got a non-zero returncode running: ['/usr/bin/git', '--help']
Error from git --help: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

But an even better message would look like this:

15:37:00  Encountered an error:
Got a non-zero returncode running: ['/usr/bin/git', '--help']
Error from git --help: PRINT THE EXCEPTION MESSAGE HERE

Make sure that `git` is installed in your shell and that `git --help` can execute successfully.

Steps To Reproduce

  1. Run dbt debug and see that it works
  2. Uninstall git in your shell
  3. Run dbt debug and see the less-than-helpful error message:
    Got a non-zero returncode running: ['/usr/bin/git', '--help']
    

Relevant log output

See above.

Environment

- OS: macOS
- Python:
- dbt: 1.7

Which database adapter are you using with dbt?

No response

Additional Context

No response

@dbeatty10 dbeatty10 added bug Something isn't working triage Medium Severity bug with minor impact that does not have resolution timeframe requirement and removed triage labels Feb 7, 2024
@jon-fearer jon-fearer linked a pull request Feb 15, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Medium Severity bug with minor impact that does not have resolution timeframe requirement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant