summaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-16 16:50:23 +0200
committerJakob Unterwurzacher2016-10-16 16:50:23 +0200
commitec4a626316550536bf98b430b2510a1340ba2721 (patch)
tree1124ce3571a7c05bca6c17b1c7dff066e5e77c9f /cli_args.go
parentb2d33028a6121f2b2a53d3ffe96dd235d59249f1 (diff)
main: catch "-extpass" AND "-masterkey" usage early
"The options -extpass and -masterkey cannot be used at the same time"
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go4
1 files changed, 4 insertions, 0 deletions
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
}