Skip to content

Commit e78a1c3

Browse files
Make default Config() Initialization respect target_path in default config file (#2093)
* defaulting target_path to none to allow check for target_path in config file * removing print statements --------- Co-authored-by: Itamar Hartstein <haritamar@gmail.com>
1 parent 1221509 commit e78a1c3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

elementary/config/config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646
project_dir: Optional[str] = None,
4747
profile_target: Optional[str] = None,
4848
project_profile_target: Optional[str] = None,
49-
target_path: str = DEFAULT_TARGET_PATH,
49+
target_path: Optional[str] = None,
5050
dbt_quoting: Optional[bool] = None,
5151
update_bucket_website: Optional[bool] = None,
5252
slack_webhook: Optional[str] = None,
@@ -94,10 +94,11 @@ def __init__(
9494
self.target_dir = self._first_not_none(
9595
target_path,
9696
config.get("target-path"),
97-
os.getcwd(),
97+
self.DEFAULT_TARGET_PATH,
9898
)
99+
99100
os.makedirs(os.path.abspath(self.target_dir), exist_ok=True)
100-
os.environ["DBT_LOG_PATH"] = os.path.abspath(target_path)
101+
os.environ["DBT_LOG_PATH"] = os.path.abspath(self.target_dir)
101102

102103
self.update_bucket_website = self._first_not_none(
103104
update_bucket_website,

0 commit comments

Comments
 (0)