diff options
author | Jakob Unterwurzacher | 2017-01-29 00:34:12 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-01-29 00:34:12 +0100 |
commit | 6166dad05c1bf505f1c0fca1fbe8bf6a27d02db9 (patch) | |
tree | 436e69d74445f56f0858d2a459d3e2b0edfea3fc /cli_args.go | |
parent | de200aad72f8718041f345b68c3c77332f995861 (diff) |
readpassword: support spaces in "-passfile" filename
...and while we are at it, also filenames starting with "-".
Diffstat (limited to 'cli_args.go')
-rw-r--r-- | cli_args.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli_args.go b/cli_args.go index 89cbdd9..25392c4 100644 --- a/cli_args.go +++ b/cli_args.go @@ -151,9 +151,9 @@ func parseCliOpts() (args argContainer) { os.Exit(ErrExitUsage) } } - // "-passfile FILE" is a shortcut for "-extpass=/bin/cat FILE" + // '-passfile FILE' is a shortcut for -extpass='/bin/cat -- FILE' if args.passfile != "" { - args.extpass = "/bin/cat " + 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") |