Skip to content

Commit 6bf7ae8

Browse files
authored
Whops, forgot to exit when there're less than two arguments
Thanks @SleepingProcess
1 parent 8789445 commit 6bf7ae8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,12 @@ func main(){
207207
fmt.Println("pdf-diff: highlights the differences between two pdf files.")
208208
if len(os.Args) < 2 {
209209
fmt.Println("You need to specify two parameters!")
210+
os.Exit(1)
210211
}
211212

212213
CreatePNG(os.Args[1])
213214
CreatePNG(os.Args[2])
214215

215216
Compare(os.Args[1], os.Args[2])
216217

217-
}
218+
}

0 commit comments

Comments
 (0)