diff options
-rw-r--r-- | buildstream/_frontend/main.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py index 4eb785107..7dc3b34bf 100644 --- a/buildstream/_frontend/main.py +++ b/buildstream/_frontend/main.py @@ -588,9 +588,13 @@ def workspace_reset(app, source, track, no_checkout, variant, element): def workspace_list(app): """List open workspaces""" - project = Project(app.main_options['directory'], - app.host_arch, - app.target_arch) + try: + project = Project(app.main_options['directory'], + app.host_arch, + app.target_arch) + except _BstError as e: + click.echo("Error loading project: %s" % str(e)) + sys.exit(1) logger = LogLine(app.content_profile, app.format_profile, |