Merge pull request #1429 from harshavardhana/minio-cli

cli: Remove the errant newline upon error printing
This commit is contained in:
Harshavardhana
2015-11-18 20:14:24 -08:00
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -103,7 +103,7 @@ func (a *App) getNewContext(arguments []string) (*Context, error) {
fmt.Fprint(a.Writer, fmt.Sprintf("Unknown flag. ‘%s’\n\n", strings.Join(arguments[1:], ", ")))
}
ShowAppHelp(context)
fmt.Fprintln(a.Writer)
fmt.Fprint(a.Writer, "")
return nil, err
}
@@ -111,7 +111,7 @@ func (a *App) getNewContext(arguments []string) (*Context, error) {
if nerr != nil {
fmt.Fprintln(a.Writer, nerr)
ShowAppHelp(context)
fmt.Fprintln(a.Writer)
fmt.Fprint(a.Writer, "")
return nil, nerr
}
return context, nil
@@ -220,7 +220,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
} else {
ShowCommandHelp(ctx, context.Args().First())
}
fmt.Fprintln(a.Writer)
fmt.Fprint(a.Writer, "")
return nerr
}
+2 -2
View File
@@ -92,7 +92,7 @@ func (c Command) Run(ctx *Context) error {
fmt.Fprint(ctx.App.Writer, fmt.Sprintf("Unknown flag. ‘%s’\n\n", ctx.Args().Tail()[0]))
}
ShowCommandHelp(ctx, c.Name)
fmt.Fprintln(ctx.App.Writer)
fmt.Fprint(ctx.App.Writer, "")
return err
}
@@ -101,7 +101,7 @@ func (c Command) Run(ctx *Context) error {
fmt.Fprintln(ctx.App.Writer, nerr)
fmt.Fprintln(ctx.App.Writer)
ShowCommandHelp(ctx, c.Name)
fmt.Fprintln(ctx.App.Writer)
fmt.Fprint(ctx.App.Writer, "")
return nerr
}
context := NewContext(ctx.App, set, ctx.globalSet)
+2 -2
View File
@@ -24,8 +24,8 @@
},
{
"path": "github.com/minio/cli",
"revision": "581b22bc349da4a9f3333b2567e3a3decfcf7d04",
"revisionTime": "2015-11-16T14:25:09-08:00"
"revision": "c4a07c7b68db77ccd119183fb1d01dd5972434ab",
"revisionTime": "2015-11-18T20:00:48-08:00"
},
{
"path": "github.com/minio/minio-go",