Handle vault decrypt --output=- (#31066)

In cli.CLI.unfrack_path callback, special case if the
value of '--output' is '-', and avoid expanding
it to a full path.

vault cli already has special cases for '-', so it
just needs to get the original value to work.

Fixes #30550
This commit is contained in:
Adrian Likins 2017-10-03 12:02:16 -04:00 committed by GitHub
commit 278ff19bea
2 changed files with 16 additions and 4 deletions

View file

@ -406,7 +406,10 @@ class CLI(with_metaclass(ABCMeta, object)):
@staticmethod
def unfrack_path(option, opt, value, parser):
setattr(parser.values, option.dest, unfrackpath(value))
if value != '-':
setattr(parser.values, option.dest, unfrackpath(value))
else:
setattr(parser.values, option.dest, value)
@staticmethod
def base_parser(usage="", output_opts=False, runas_opts=False, meta_opts=False, runtask_opts=False, vault_opts=False, module_opts=False,