[Suggestion] Return error when command run with `distrobox-host-exec` fails
Is your feature request related to a problem? Please describe.
distrobox-host-exec does not return the error if a program call fails.
Describe the solution you'd like
I would like distrobox-host-exec to behave as when the command is run directly on the host.
Additional context Wrong command run on the host:
(bash) albi@localhost:~
$ micro
exit <-----
Wrong command run from a container with distrobox-host-exec:
(bash) albi@abox:~
$ distrobox-host-exec micro
<-------
It currently correctly returns the right exit code:
You are right, the error codes are correctly returned. What I wanted was for bash to print exit when a command fails with distrobox-exec-host as it does on the host system:
But as it can be seen from the screenshot this happens not only with distrobox-host-exec but for all commands run inside distrobox so the "problem" should be somewhere else.
Furthermore I found a post on Stack Exchange where they explain why exit is printed in the first place but I am still not getting the logic fully:
Bash prints "exit" when it is about to exit a non-login shell, and prints "logout" (or equivalent in a locale used) when it is about to exit a login shell.
Summary: I am closing this as it is really not a big deal and I need to study a bit more how things work. Thank you very much for your answer and time!