Skip to content

Commit 2bbf22c

Browse files
committed
MB-65341 Clarify when --key can be passed
Change-Id: Ic31a67df55f95fed65cdd694be2f388e9ab790d6 Reviewed-on: https://review.couchbase.org/c/couchbase-cli/+/224266 Reviewed-by: Safian Ali <safian.ali@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
1 parent 24a007a commit 2bbf22c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cbmgr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3337,8 +3337,10 @@ def _set(self, opts):
33373337
if not opts.encryption_type:
33383338
_exit_if_errors(["--type must be specified if setting encryption settings"])
33393339

3340-
if (opts.encryption_type == "key" and not opts.key) or (opts.encryption_type != "key" and opts.key):
3340+
if opts.encryption_type == "key" and not opts.key:
33413341
_exit_if_errors(["when --type is 'key', --key must be specified, and vice versa"])
3342+
if opts.encryption_type != "key" and opts.key:
3343+
_exit_if_errors(["--key should only be specified when --type is 'key'"])
33423344

33433345
dek_rotation_interval, dek_lifetime = None, None
33443346
if opts.dek_rotation_interval:

0 commit comments

Comments
 (0)