mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
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:
parent
fc1430aa92
commit
ab1739ba34
@ -278,6 +278,11 @@ func parseCommandLineOptions() RuntimeOptions {
|
|||||||
flag.Usage = usageFor(flag.CommandLine, usage, longUsage)
|
flag.Usage = usageFor(flag.CommandLine, usage, longUsage)
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
if len(flag.Args()) > 0 {
|
||||||
|
flag.Usage()
|
||||||
|
os.Exit(2)
|
||||||
|
}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user