Do not show successful msg in mb command when the latter actually fails (#1761)
This commit is contained in:
committed by
Harshavardhana
parent
489d1629fb
commit
16ae081c4c
+8
-2
@@ -117,11 +117,17 @@ func mainMakeBucket(ctx *cli.Context) {
|
||||
targetURL := ctx.Args().Get(i)
|
||||
// Instantiate client for URL.
|
||||
clnt, err := newClient(targetURL)
|
||||
errorIf(err.Trace(targetURL), "Invalid target ‘"+targetURL+"’.")
|
||||
if err != nil {
|
||||
errorIf(err.Trace(targetURL), "Invalid target ‘"+targetURL+"’.")
|
||||
continue
|
||||
}
|
||||
|
||||
// Make bucket.
|
||||
err = clnt.MakeBucket(region)
|
||||
errorIf(err.Trace(targetURL), "Unable to make bucket ‘"+targetURL+"’.")
|
||||
if err != nil {
|
||||
errorIf(err.Trace(targetURL), "Unable to make bucket ‘"+targetURL+"’.")
|
||||
continue
|
||||
}
|
||||
|
||||
// Successfully created a bucket.
|
||||
printMsg(makeBucketMessage{Status: "success", Bucket: targetURL})
|
||||
|
||||
Reference in New Issue
Block a user