Skip to content

Commit

Permalink
fix: Fix faulty parsing of arguments if neither -r nor -m are spe…
Browse files Browse the repository at this point in the history
…cified
  • Loading branch information
pojntfx committed Sep 2, 2021
1 parent 7692392 commit ed3b2ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,22 +142,22 @@ Usage: %s [OPTION...] "<COMMAND...>"
go func(t Target) {
// Construct the arguments
dockerArgs := fmt.Sprintf(
`run %v%v --platform linux/%v%v %v /bin/sh -c`,
`run %v%v--platform linux/%v%v %v /bin/sh -c`,
func() string {
// Attach stdin and setup a TTY
if *itFlag {
return "-it"
return "-it "
}

return ""
}(),
func() string {
if *mountFlag {
if *readOnlyFlag {
return fmt.Sprintf(" -v %v:/data:ro", pwd)
return fmt.Sprintf("-v %v:/data:ro ", pwd)
}

return fmt.Sprintf(" -v %v:/data:z", pwd)
return fmt.Sprintf("-v %v:/data:z ", pwd)
}

return ""
Expand Down

0 comments on commit ed3b2ce

Please sign in to comment.