mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Ensure we clean up after attempting to find a shell
This commit is contained in:
4
aliases
4
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"
|
||||
|
Reference in New Issue
Block a user