From 3faf6504bc6175fa04f6caa60b0afa9680586339 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sun, 27 Aug 2017 16:40:58 +0100 Subject: [PATCH] Ensure we clean up after attempting to find a shell --- aliases | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aliases b/aliases index 29f80b4..b92e38d 100644 --- a/aliases +++ b/aliases @@ -196,6 +196,10 @@ _dsh() { if [ -z "$prog" ]; then set -o pipefail + local rm= + if [ "$dowhat" = 'run' ]; then + rm='--rm --entrypoint=' + fi for shell in bash sh; do if shell_path="$(eval "docker $dowhat $rm $host which $shell" <&- | sed 's|[\r\n]||g')"; then prog="$shell_path"