main: catch "-extpass" AND "-masterkey" usage early

"The options -extpass and -masterkey cannot be used at the same time"
This commit is contained in:
Jakob Unterwurzacher 2016-10-16 16:50:23 +02:00
parent b2d33028a6
commit ec4a626316
1 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,10 @@ func parseCliOpts() (args argContainer) {
if args.passfile != "" {
args.extpass = "/bin/cat " + args.passfile
}
if args.extpass != "" && args.masterkey != "" {
tlog.Fatal.Printf("The options -extpass and -masterkey cannot be used at the same time")
os.Exit(ErrExitUsage)
}
return args
}