Checking and reporting missing the mandatory parameter avoid clueless error
message for bucket chown.
Signed-off-by: Zulai Wang <zl31wang@gmail.com>
(cherry picked from commit
158a1f4313c0fa206031ede6f48a26c0c7467d57)
}
if (opt_cmd == OPT::BUCKET_CHOWN) {
+ if (bucket_name.empty()) {
+ cerr << "ERROR: bucket name not specified" << std::endl;
+ return EINVAL;
+ }
bucket_op.set_bucket_name(bucket_name);
bucket_op.set_new_bucket_name(new_bucket_name);