This is a minor change to prevent a panic in an admittedly niche edge case.
What this PR does / why we need it
This PR gracefully handles no args being passed to the entrypoint binary.
# before
./docker-entrypoint
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
main.run({0xc000014140?, 0xc00006e740?, 0x0?}, 0x60?, 0x0?)
/usr/local/src/dex/cmd/docker-entrypoint/main.go:56 +0x5c5
main.main()
/usr/local/src/dex/cmd/docker-entrypoint/main.go:21 +0x65
# after
./docker-entrypoint
error: no args passed to entrypoint
This can occur if someone builds upon the upstream dex image (e.g., adding internal company certificates) and inadvertently breaks the entrypoint/cmd.
Overview
This is a minor change to prevent a panic in an admittedly niche edge case.
What this PR does / why we need it
This PR gracefully handles no args being passed to the entrypoint binary.
This can occur if someone builds upon the upstream dex image (e.g., adding internal company certificates) and inadvertently breaks the entrypoint/cmd.
Special notes for your reviewer