summaryrefslogtreecommitdiff
path: root/buildstream/_frontend
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2018-02-26 14:06:33 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2018-03-01 17:27:28 +0000
commit42de997e993fb1f97b2f2f8e873294e8a7055f79 (patch)
treeacd39b428a6a9b0d941656335539ff81ddde9caa /buildstream/_frontend
parent8a4fff9af391bea52397dbfcac907ab5759ef50c (diff)
downloadbuildstream-42de997e993fb1f97b2f2f8e873294e8a7055f79.tar.gz
Pipeline: Give more helpful errors when opening a workspace for an element that has no sources
When trying to look at the source code for an element, elements that modify artifacts (e.g. script and compose elements) don't have sources, so we suggest some other elements that they might try opening workspaces for.
Diffstat (limited to 'buildstream/_frontend')
-rw-r--r--buildstream/_frontend/cli.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index 29bae1da4..be84902d9 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -611,8 +611,7 @@ def workspace_open(app, no_checkout, force, track, element, directory):
app.pipeline.open_workspace(app.scheduler, directory, no_checkout, track, force)
click.echo("", err=True)
except BstError as e:
- click.echo("", err=True)
- click.echo("ERROR: {}".format(e), err=True)
+ app.print_error(e)
sys.exit(-1)