diff options
author | Phillip Smyth <phillipsmyth@codethink.co.uk> | 2018-01-12 12:59:56 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-02-13 06:25:35 +0100 |
commit | 20b8d035038148a848df52b798946ef6fbe012cb (patch) | |
tree | 6ac3738768c3387d060a008f659fc776b2d96e48 /buildstream/_frontend/cli.py | |
parent | b5f43ece275638b5ba4bff817ba3379dd9ae936a (diff) | |
download | buildstream-20b8d035038148a848df52b798946ef6fbe012cb.tar.gz |
_frontend/cli.py: Check for invalid --track-except or --track-save
Report error when --track-except or --track-save is specified without
--track or --track-all.
Fixes #181
Diffstat (limited to 'buildstream/_frontend/cli.py')
-rw-r--r-- | buildstream/_frontend/cli.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py index 8678e8228..9d203427f 100644 --- a/buildstream/_frontend/cli.py +++ b/buildstream/_frontend/cli.py @@ -187,6 +187,14 @@ def cli(context, **kwargs): def build(app, elements, all, track, track_save, track_all, track_except): """Build elements in a pipeline""" + if track_except and not (track or track_all): + click.echo("ERROR: --track-except cannot be used without --track or --track-all") + sys.exit(-1) + + if track_save and not (track or track_all): + click.echo("ERROR: --track-save cannot be used without --track or --track-all") + sys.exit(-1) + if track_all: track = elements |