diff --git a/.changes/unreleased/Fixes-20230621-030733.yaml b/.changes/unreleased/Fixes-20230621-030733.yaml new file mode 100644 index 00000000000..0af1a005928 --- /dev/null +++ b/.changes/unreleased/Fixes-20230621-030733.yaml @@ -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" diff --git a/core/dbt/cli/params.py b/core/dbt/cli/params.py index 603c08d29d7..53275149e6e 100644 --- a/core/dbt/cli/params.py +++ b/core/dbt/cli/params.py @@ -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, ) diff --git a/core/dbt/task/debug.py b/core/dbt/task/debug.py index 9abc537ebd3..769c7fd8cad 100644 --- a/core/dbt/task/debug.py +++ b/core/dbt/task/debug.py @@ -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)