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,9 +151,11 @@ func mainErr(args []string) error {
case "help": case "help":
flagSet.Usage() flagSet.Usage()
case "build", "test": case "build", "test":
switch args[1] { if len(args) > 1 {
case "-h", "-help", "--help": switch args[1] {
flagSet.Usage() case "-h", "-help", "--help":
flagSet.Usage()
}
} }
wd, err := os.Getwd() wd, err := os.Getwd()
if err != nil { if err != nil {

Loading…
Cancel
Save