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] Error occurs even if profiles_dir is specified on dbt cli when the home/.dbt directory does not exist #11286

Open
2 tasks done
tnk-ysk opened this issue Feb 9, 2025 · 0 comments · May be fixed by #11287
Open
2 tasks done
Labels
bug Something isn't working triage

Comments

@tnk-ysk
Copy link

tnk-ysk commented Feb 9, 2025

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

Error occurs even if profiles_dir is specified in kwargs on dbt cli when the home/.dbt directory does not exist.
But it worked when I specified --profiles-dir in the args or when I specified it in an environment variable.

I don't think this is the expected result.

Expected Behavior

Even if home/.dbt does not exist, no error will occur if profiles_dir is specified.

Steps To Reproduce

  1. Delete home/.dbt.
  2. Run the code below.
DBT_DIR = "/path/to/dbt_dir"
res: dbtRunnerResult = dbt.invoke(
    args=args + ["ls"],
    project_dir=DBT_DIR,
    profiles_dir=DBT_DIR,
)
if res.success == False:
    logger.error(f"Command failed with error: {res.exception}")        
  1. Error occured.
Command failed with error: Path '/Users/tnk-ysk/.dbt' does not exist.

Relevant log output

Environment

- OS: macOS 14.4
- Python: 3.11.10
- dbt: 1.9.1

Which database adapter are you using with dbt?

No response

Additional Context

No response

@tnk-ysk tnk-ysk added bug Something isn't working triage labels Feb 9, 2025
@tnk-ysk tnk-ysk linked a pull request Feb 9, 2025 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 triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant