cmd/syncthing: Trigger usage message on extra CLI parameters

fixes: #3690

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3763
This commit is contained in:
Stefan Tatschner authored and Audrius Butkevicius committed 2016-11-27 11:21:05 +00:00
1 parent fc1430aa92
commit ab1739ba34
1 file changed
+5
+5
View File
@@ -278,6 +278,11 @@ func parseCommandLineOptions() RuntimeOptions {
flag.Usage = usageFor(flag.CommandLine, usage, longUsage)
flag.Parse()
if len(flag.Args()) > 0 {
flag.Usage()
os.Exit(2)
}
return options
}