fix out of bounds panic with "garble build"

Forgot to run all the tests with the last commit.
pull/22/head
Daniel Martí 6 years ago
parent 1ef3daf251
commit f0a609c7fc

@ -151,10 +151,12 @@ func mainErr(args []string) error {
case "help": case "help":
flagSet.Usage() flagSet.Usage()
case "build", "test": case "build", "test":
if len(args) > 1 {
switch args[1] { switch args[1] {
case "-h", "-help", "--help": case "-h", "-help", "--help":
flagSet.Usage() flagSet.Usage()
} }
}
wd, err := os.Getwd() wd, err := os.Getwd()
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save