9 Commits

Author SHA1 Message Date
James Nugent
ae83b71b08 cli: Fix panic on empty data argument to kv put
Passing in an empty quoted argument from the shell currently panics as
we never check the length being greater than 0 prior to indexing into
the first rune, as illustrated in the test in this commit.

We also fix the panic, treating an empty string for data as equivalent
to not having passed it in the first place.
2017-01-05 08:02:38 -06:00
James Nugent
2e8f440ac7 cli: Add -base64 option to consul kv put
This commit adds a -base64 option to the consul kv put command, which
base 64 decodeds the data prior to writing it. This can be used in
conjunction with `consul kv get -base64 key`.
2017-01-04 16:12:21 -06:00
mckennajones
6bc1164825 Unit test for kv_put with negative values 2016-11-29 22:29:31 -08:00
mckennajones
40a8f13cd9 Simple check to differentiate between stdin flag or value that contains
a -
2016-11-27 12:55:14 -08:00
Seth Vargo
1898d071ce
Fix kv put flags 2016-09-26 16:13:39 -07:00
Seth Vargo
d0ac899f79
Fix up kv put help output 2016-09-26 16:11:23 -07:00
Seth Vargo
39fb70ff67
Fix CAS operations for put 2016-09-26 16:06:56 -07:00
Seth Vargo
6cdf354270
Fix copy-paste comments 2016-09-26 16:06:54 -07:00
Seth Vargo
82bddd7f9b
Add kv put command 2016-09-26 16:06:53 -07:00