Skip to content

Commit

Permalink
Minor bugfix to secrets --file args read
Browse files Browse the repository at this point in the history
Example steps to reproduce the error before fix:
```
$ echo -n 'bla' | kapitan secrets --write gpg:secrets/common/test_targets/gcp_project_id -f - -t test_terraform_dummy
Traceback (most recent call last):
  File "/Users/rjmco/.pyenv/versions/3.7.0/bin/kapitan", line 11, in <module>
    load_entry_point('kapitan==0.18.2', 'console_scripts', 'kapitan')()
  File "/Users/rjmco/.pyenv/versions/3.7.0/lib/python3.7/site-packages/kapitan/cli.py", line 279, in main
    secret_write(args, ref_controller)
  File "/Users/rjmco/.pyenv/versions/3.7.0/lib/python3.7/site-packages/kapitan/cli.py", line 291, in secret_write
    file_name = args.file_name
AttributeError: 'Namespace' object has no attribute 'file_name'
```
  • Loading branch information
rjmco committed Oct 20, 2018
1 parent d89c267 commit 76699eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kapitan/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def main():
def secret_write(args, ref_controller):
"Write secret to ref_controller based on cli args"
token_name = args.write
file_name = args.file_name
file_name = args.file
data = None

if file_name is None:
Expand Down

0 comments on commit 76699eb

Please sign in to comment.