Skip to content

Commit

Permalink
Merge pull request dbt-labs#2508 from scarrucciu/patch-1
Browse files Browse the repository at this point in the history
Fix --dependency arg bug in create_adapter_plugin
  • Loading branch information
beckjake authored Jun 1, 2020
2 parents c3c99f3 + 2dd7ef5 commit 05634e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
- Added intersection syntax for model selector ([#2167](https:/fishtown-analytics/dbt/issues/2167), [#2417](https:/fishtown-analytics/dbt/pull/2417))
- Extends model selection syntax with at most n-th parent/children `dbt run --models 3+m1+2` ([#2052](https:/fishtown-analytics/dbt/issues/2052), [#2485](https:/fishtown-analytics/dbt/pull/2485))

### Fixes
- Fixed an error in create_adapter_plugins.py script when -dependency arg not passed ([#2507](https:/fishtown-analytics/dbt/issues/2507), [#2508](https:/fishtown-analytics/dbt/pull/2508))

Contributors:
- [@raalsky](https:/Raalsky) ([#2417](https:/fishtown-analytics/dbt/pull/2417), [#2485](https:/fishtown-analytics/dbt/pull/2485))
- [@alf-mindshift](https:/alf-mindshift) ([#2431](https:/fishtown-analytics/dbt/pull/2431)
- [@alf-mindshift](https:/alf-mindshift) ([#2431](https:/fishtown-analytics/dbt/pull/2431))
- [@scarrucciu](https:/scarrucciu) ([#2508](https:/fishtown-analytics/dbt/pull/2508))

## dbt 0.17.0 (Release TBD)

Expand Down
7 changes: 4 additions & 3 deletions core/scripts/create_adapter_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,12 @@ def parse_args(argv=None):
parsed.title_case = parsed.adapter.title()

if parsed.set_dependency:

prefix = '\n '

if parsed.dependency:
# ['a', 'b'] => "'a',\n 'b'"; ['a'] -> "'a',"

prefix = '\n '


parsed.dependency = prefix + prefix.join(
"'{}',".format(d) for d in parsed.dependency
)
Expand Down

0 comments on commit 05634e6

Please sign in to comment.