feat(set): adds --file flag to input from a file path
This commit is contained in:
parent
59cb09a8e7
commit
b89db8dc48
5 changed files with 30 additions and 2 deletions
2
testdata/help-set.ct
vendored
2
testdata/help-set.ct
vendored
|
|
@ -22,6 +22,7 @@ Aliases:
|
|||
|
||||
Flags:
|
||||
-e, --encrypt Encrypt the value at rest using age
|
||||
-f, --file string Read value from a file
|
||||
-h, --help help for set
|
||||
-i, --interactive Prompt before overwriting an existing key
|
||||
--safe Do not overwrite if the key already exists
|
||||
|
|
@ -48,6 +49,7 @@ Aliases:
|
|||
|
||||
Flags:
|
||||
-e, --encrypt Encrypt the value at rest using age
|
||||
-f, --file string Read value from a file
|
||||
-h, --help help for set
|
||||
-i, --interactive Prompt before overwriting an existing key
|
||||
--safe Do not overwrite if the key already exists
|
||||
|
|
|
|||
3
testdata/set-file-conflict-err.ct
vendored
Normal file
3
testdata/set-file-conflict-err.ct
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$ fecho myfile contents
|
||||
$ pda set key@sfc value --file myfile --> FAIL
|
||||
FAIL cannot set 'key@sfc': --file and VALUE argument are mutually exclusive
|
||||
4
testdata/set-file.ct
vendored
Normal file
4
testdata/set-file.ct
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
$ fecho myfile hello from file
|
||||
$ pda set key@sf --file myfile
|
||||
$ pda get key@sf
|
||||
hello from file
|
||||
Loading…
Add table
Add a link
Reference in a new issue