Skip to content
Snippets Groups Projects
Commit 676d8f97 authored by Phillip Smyth's avatar Phillip Smyth
Browse files

_frontend/cli.py: Add call to get_default_elements

parent 74965bce
No related branches found
No related tags found
Loading
...@@ -306,7 +306,11 @@ def init(app, project_name, format_version, element_path, force): ...@@ -306,7 +306,11 @@ def init(app, project_name, format_version, element_path, force):
type=click.Path(readable=False)) type=click.Path(readable=False))
@click.pass_obj @click.pass_obj
def build(app, elements, all_, track_, track_save, track_all, track_except, track_cross_junctions): def build(app, elements, all_, track_, track_save, track_all, track_except, track_cross_junctions):
"""Build elements in a pipeline""" """Build elements in a pipeline
Declaring no elements with result in building a default element if one is declared in the project configuration.
If no default is declared, all elements in the project will be built"""
if (track_except or track_cross_junctions) and not (track_ or track_all): if (track_except or track_cross_junctions) and not (track_ or track_all):
click.echo("ERROR: The --track-except and --track-cross-junctions options " click.echo("ERROR: The --track-except and --track-cross-junctions options "
...@@ -321,6 +325,8 @@ def build(app, elements, all_, track_, track_save, track_all, track_except, trac ...@@ -321,6 +325,8 @@ def build(app, elements, all_, track_, track_save, track_all, track_except, trac
guessed_target = app.context.guess_element() guessed_target = app.context.guess_element()
if guessed_target: if guessed_target:
elements = (guessed_target,) elements = (guessed_target,)
else:
app.project.get_default_elements()
if track_all: if track_all:
track_ = elements track_ = elements
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment