Browse Source

Gracefully handle no args being passed to entrypoint (#3589)

Signed-off-by: Richard Gomez <rmgomez368@gmail.com>
pull/3621/head
Richard Gomez 2 years ago committed by GitHub
parent
commit
6fca251dc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      cmd/docker-entrypoint/main.go

4
cmd/docker-entrypoint/main.go

@ -17,6 +17,10 @@ func main() {
// Note that this docker-entrypoint program is args[0], and it is provided with the true process
// args.
args := os.Args[1:]
if len(args) == 0 {
fmt.Println("error: no args passed to entrypoint")
os.Exit(1)
}
if err := run(args, realExec, realWhich); err != nil {
fmt.Println("error:", err.Error())

Loading…
Cancel
Save