From ec4a626316550536bf98b430b2510a1340ba2721 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 16 Oct 2016 16:50:23 +0200 Subject: [PATCH] main: catch "-extpass" AND "-masterkey" usage early "The options -extpass and -masterkey cannot be used at the same time" --- cli_args.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli_args.go b/cli_args.go index 036de9b..1c9400c 100644 --- a/cli_args.go +++ b/cli_args.go @@ -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 }