|
|
|
@ -228,11 +228,11 @@ func (a *App) Run(arguments []string) (err error) {
|
|
|
|
|
|
|
|
|
|
// DEPRECATED: Another entry point to the cli app, takes care of passing arguments and error handling
|
|
|
|
|
func (a *App) RunAndExitOnError() {
|
|
|
|
|
fmt.Fprintf(os.Stderr,
|
|
|
|
|
fmt.Fprintf(OutWriter,
|
|
|
|
|
"DEPRECATED cli.App.RunAndExitOnError. %s See %s\n",
|
|
|
|
|
contactSysadmin, runAndExitOnErrorDeprecationURL)
|
|
|
|
|
if err := a.Run(os.Args); err != nil {
|
|
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
|
fmt.Fprintln(OutWriter, err)
|
|
|
|
|
OsExiter(1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -422,7 +422,7 @@ func HandleAction(action interface{}, context *Context) (err error) {
|
|
|
|
|
vals := reflect.ValueOf(action).Call([]reflect.Value{reflect.ValueOf(context)})
|
|
|
|
|
|
|
|
|
|
if len(vals) == 0 {
|
|
|
|
|
fmt.Fprintf(os.Stderr,
|
|
|
|
|
fmt.Fprintf(OutWriter,
|
|
|
|
|
"DEPRECATED Action signature. Must be `cli.ActionFunc`. %s See %s\n",
|
|
|
|
|
contactSysadmin, appActionDeprecationURL)
|
|
|
|
|
return nil
|
|
|
|
|