You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:52:02 UTC

[buildstream] 07/08: _frontend/cli.py: Propagate machine readable error codes in `bst shell`

This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tristan/shell-artifacts
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit a8e6f32d52230eb2a5e4cfe890583f2763f99498
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Dec 9 16:05:32 2020 +0900

    _frontend/cli.py: Propagate machine readable error codes in `bst shell`
    
    This command prefixes a reported error, so it rewraps the error into
    an AppError, this needs to propagate the originating machine readable
    error.
---
 src/buildstream/_frontend/cli.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 5e42bda..ab06e8a 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -640,7 +640,7 @@ def shell(app, element, mount, isolate, build_, cli_buildtree, pull_, command):
                 pull_=pull_,
             )
         except BstError as e:
-            raise AppError("Error launching shell: {}".format(e), detail=e.detail) from e
+            raise AppError("Error launching shell: {}".format(e), detail=e.detail, reason=e.reason) from e
 
     # If there were no errors, we return the shell's exit code here.
     sys.exit(exitcode)