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 default_profiles_dir #11287

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

Conversation

tnk-ysk
Copy link

@tnk-ysk tnk-ysk commented Feb 9, 2025

Resolves #11286

Problem

Avoid error if default_profiles_dir does not exist if profiles_dir is specified.

Solution

Check current directory and home/.dbt and use current directory if profiles.yml was not present in either.
This allows to avoid click.Path(exists=True) in default_profiles_dir if profiles_dir is specified.

This solution is similar to default_project_dir.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@tnk-ysk tnk-ysk requested a review from a team as a code owner February 9, 2025 14:57
@cla-bot cla-bot bot added the cla:yes label Feb 9, 2025
Copy link
Contributor

github-actions bot commented Feb 9, 2025

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@github-actions github-actions bot added the community This PR is from a community member label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes community This PR is from a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Error occurs even if profiles_dir is specified on dbt cli when the home/.dbt directory does not exist
1 participant