Skip to content

Commit

Permalink
Fix: set ENV VARS as invocation context for dbt >= 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Illia Yurtsiv committed Jun 17, 2024
1 parent 7348b65 commit 2db5f7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dbt_osmosis/vendored/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@

try:
# dbt >= 1.8
from dbt_common.clients.system import make_directory
from dbt_common.clients.system import make_directory, get_env
from dbt_common.context import set_invocation_context
except ImportError:
# dbt < 1.8
from dbt.clients.system import make_directory
Expand Down Expand Up @@ -386,6 +387,8 @@ def __init__(
project_dir=project_dir or DEFAULT_PROJECT_DIR,
profile=profile,
)
if hasattr(sys.modules[__name__], 'set_invocation_context'):
set_invocation_context(get_env())
if vars is None:
vars = "{}"
self.base_config.vars = vars
Expand Down

0 comments on commit 2db5f7f

Please sign in to comment.