Skip to content

Commit

Permalink
Remove --config-dir instead of fixing #7774 (#7793)
Browse files Browse the repository at this point in the history
* Stringfy the dir always to solve the bug.

* Add changelog

---------

Co-authored-by: Mila Page <[email protected]>
  • Loading branch information
VersusFacit and VersusFacit authored Jun 21, 2023
1 parent 9ff2f6e commit 4cdeff1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230621-030733.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix a bad implicit string conversion regression in debug --config-dir code.
time: 2023-06-21T03:07:33.815966-07:00
custom:
Author: versusfacit
Issue: "7774"
2 changes: 1 addition & 1 deletion core/dbt/cli/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
config_dir = click.option(
"--config-dir",
envvar=None,
help="Show the configured location for the profiles.yml file and exit",
help="Print a system-specific command to access the directory that the current dbt project is searching for a profiles.yml. Then, exit. This flag renders other debug step flags no-ops.",
is_flag=True,
)

Expand Down
11 changes: 6 additions & 5 deletions core/dbt/task/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,14 @@ def project_profile(self):
return None
return self.project.profile_name

def path_info(self):
open_cmd = dbt.clients.system.open_dir_cmd()
fire_event(OpenCommand(open_cmd=open_cmd, profiles_dir=self.profiles_dir))

def run(self) -> bool:
# WARN: this is a legacy workflow that is not compatible with other runtime flags
if self.args.config_dir:
self.path_info()
fire_event(
OpenCommand(
open_cmd=dbt.clients.system.open_dir_cmd(), profiles_dir=str(self.profiles_dir)
)
)
return DebugRunStatus.SUCCESS.value

version: str = get_installed_version().to_version_string(skip_matcher=True)
Expand Down

0 comments on commit 4cdeff1

Please sign in to comment.