Description
Running civo objectstore credential secret without --access-key and without a positional argument crashes with an index-out-of-range panic instead of showing a usage error.
File: cmd/objectstore/objectstore_credential_secret.go:33
} else if args[0] != "" {
No Args: validator is set on this command, so args can be empty when this line runs.
Steps to reproduce
civo objectstore credential secret
Expected
A friendly error like "You must provide an access key. See --help for more information." (the command already has this message at line 38, but it's unreachable due to the panic above).
Actual
panic: runtime error: index out of range [0] with length 0
Description
Running
civo objectstore credential secretwithout--access-keyand without a positional argument crashes with an index-out-of-range panic instead of showing a usage error.File:
cmd/objectstore/objectstore_credential_secret.go:33No
Args:validator is set on this command, soargscan be empty when this line runs.Steps to reproduce
Expected
A friendly error like "You must provide an access key. See --help for more information." (the command already has this message at line 38, but it's unreachable due to the panic above).
Actual