Add cli updates amd change mb help a bit

This commit is contained in:
Harshavardhana
2015-09-05 22:46:23 -07:00
parent 0eb1403caf
commit bf22c490a3
4 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ EXAMPLES:
$ mc {{.Name}} https://s3.amazonaws.com/public-document-store
3. Make a folder on local filesystem, including its parent folders as needed.
$ mc {{.Name}} ~/
$ mc {{.Name}} "My Documents"
3. Create a bucket on Minio cloud storage.
$ mc {{.Name}} https://play.minio.io:9000/mongodb-backup
+2 -2
View File
@@ -34,8 +34,8 @@
"canonical": "github.com/minio/cli",
"comment": "",
"local": "vendor/github.com/minio/cli",
"revision": "8d4728a947c06097835fb3e2858b7754580a1d2f",
"revisionTime": "2015-09-01T18:40:37-07:00"
"revision": "20bcbfd3118387fcf8e29dd3c45bff0c13de2a01",
"revisionTime": "2015-09-05T22:26:54-07:00"
},
{
"canonical": "github.com/minio/minio-go",
+4
View File
@@ -1,6 +1,7 @@
package cli
import (
"errors"
"fmt"
"io"
"os"
@@ -290,6 +291,9 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
if c != nil {
return c.Run(context)
}
fmt.Fprintf(a.Writer, "Incorrect Usage.\n\n")
ShowSubcommandHelp(context)
return errors.New("Command not found")
}
// Run default Action
+1 -3
View File
@@ -181,9 +181,7 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
Before: func(_ *cli.Context) error { return nil },
},
}
a.Run([]string{"", "foo", "--lang", "spanish", "abcd"})
expect(t, context.Args().Get(0), "abcd")
a.Run([]string{"", "foo", "--lang", "spanish"})
expect(t, context.String("lang"), "spanish")
}