Skip to content

Commit

Permalink
dbt init works with click (#6698)
Browse files Browse the repository at this point in the history
dbt init works with click
  • Loading branch information
MichelleArk authored Jan 26, 2023
1 parent d27016a commit 7fa61f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230124-175110.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: dbt init works with click
time: 2023-01-24T17:51:10.74065-05:00
custom:
Author: michelleark
Issue: "5548"
8 changes: 6 additions & 2 deletions core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from dbt.task.run_operation import RunOperationTask
from dbt.task.build import BuildTask
from dbt.task.generate import GenerateTask
from dbt.task.init import InitTask


# CLI invocation
Expand Down Expand Up @@ -307,8 +308,11 @@ def deps(ctx, **kwargs):
@requires.preflight
def init(ctx, **kwargs):
"""Initialize a new dbt project."""
click.echo(f"`{inspect.stack()[0][3]}` called\n flags: {ctx.obj['flags']}")
return None, True
task = InitTask(ctx.obj["flags"], None)

results = task.run()
success = task.interpret_results(results)
return results, success


# dbt list
Expand Down

0 comments on commit 7fa61f0

Please sign in to comment.