Skip to content

Commit

Permalink
fix: --shell for alpine-based commands
Browse files Browse the repository at this point in the history
  • Loading branch information
boukeversteegh committed Mar 20, 2022
1 parent 07af7d3 commit e3c3e86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
- go
- aws
- python
- rust
- zip
runs-on: ubuntu-latest
steps:
- name: Checkout Dockerized
Expand Down
2 changes: 1 addition & 1 deletion lib/dockerized.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func main() {

preferredShells := "bash zsh sh"
var cmdPrintWelcome = fmt.Sprintf("echo '%s'", color.YellowString(welcomeMessage))
var cmdLaunchShell = fmt.Sprintf("$(command -v %[1]s | head -n1 || which %[1]s | head -n1)", preferredShells)
var cmdLaunchShell = fmt.Sprintf("$(command -pv %[1]s | head -n1 || which %[1]s | head -n1)", preferredShells)

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

0 comments on commit e3c3e86

Please sign in to comment.