-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
flag.init()
/usr/local/go/src/flag/flag.go:1199 +0xfc
Line 1199 in 6d89b38
var CommandLine = NewFlagSet(os.Args[0], ExitOnError) |
len(os.Args) > 1 is not always true, at least in Linux and macOS. If you compile a go program and then write a C program to exec it with execl("/path/to/exec", NULL), it will have no arguments at all, not even the executable name
Metadata
Metadata
Assignees
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.