Skip to content

Commit 3f9a502

Browse files
fix: launching shell
1 parent a8f0587 commit 3f9a502

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/dockerized.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ func main() {
145145
}
146146
welcomeMessage = strings.ReplaceAll(welcomeMessage, "\\", "\\\\")
147147

148-
var preferredShells = "bash zsh sh"
149-
var cmdPrintWelcome = fmt.Sprintf("echo -e '%s'", color.YellowString(welcomeMessage))
150-
var cmdLaunchShell = fmt.Sprintf("$(which %[1]s 2> /dev/null || command -v %[1]s | head -n 1)", preferredShells)
148+
var cmdPrintWelcome = fmt.Sprintf("echo '%s'", color.YellowString(welcomeMessage))
149+
var cmdLaunchShell = "$(which bash || which zsh || which sh || command -v bash || command -v zsh || command -v | head -n 1)"
151150

152151
runOptions.Environment = append(runOptions.Environment, "PS1="+ps1)
153152
runOptions.Entrypoint = []string{"/bin/sh"}

0 commit comments

Comments
 (0)