Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make clean not require a profile (#1022) #1038

Merged
merged 1 commit into from
Oct 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions dbt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def handle(args):

def handle_and_check(args):
parsed = parse_args(args)

# this needs to happen after args are parsed so we can determine the
# correct profiles.yml file
profile_config = read_config(parsed.profiles_dir)
Expand Down Expand Up @@ -207,7 +206,7 @@ def invoke_dbt(parsed):
cfg = None

try:
if parsed.which == 'deps':
if parsed.which in {'deps', 'clean'}:
# deps doesn't need a profile, so don't require one.
cfg = Project.from_current_directory()
elif parsed.which != 'debug':
Expand Down Expand Up @@ -495,4 +494,10 @@ def parse_args(args):

parsed = p.parse_args(args)

if not hasattr(parsed, 'which'):
# the user did not provide a valid subcommand. trigger the help message
# and exit with a error
p.print_help()
p.exit(1)

return parsed