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:
parent
8a3fd3c61a
commit
3faf6504bc
4
aliases
4
aliases
@ -196,6 +196,10 @@ _dsh() {
|
|||||||
|
|
||||||
if [ -z "$prog" ]; then
|
if [ -z "$prog" ]; then
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
local rm=
|
||||||
|
if [ "$dowhat" = 'run' ]; then
|
||||||
|
rm='--rm --entrypoint='
|
||||||
|
fi
|
||||||
for shell in bash sh; do
|
for shell in bash sh; do
|
||||||
if shell_path="$(eval "docker $dowhat $rm $host which $shell" <&- | sed 's|[\r\n]||g')"; then
|
if shell_path="$(eval "docker $dowhat $rm $host which $shell" <&- | sed 's|[\r\n]||g')"; then
|
||||||
prog="$shell_path"
|
prog="$shell_path"
|
||||||
|
Loading…
Reference in New Issue
Block a user