urfave/cli v1.20.0 Release Notes

Release Date: 2017-08-11 // almost 5 years ago
  • ๐Ÿ›  Fixed

    • HandleExitCoder is now correctly iterates over all errors in a MultiError. The exit code is the exit code of the last error or 1 if there are no ExitCoders in the MultiError.
    • ๐Ÿ›  Fixed YAML file loading on Windows (previously would fail validate the file path)
    • Subcommand Usage, Description, ArgsUsage, OnUsageError correctly propogated
    • ErrWriter is now passed downwards through command structure to avoid the need to redefine it
    • Pass Command context into OnUsageError rather than parent context so that all fields are avaiable
    • ๐Ÿ–จ Errors occuring in Before funcs are no longer double printed
    • ๐Ÿ‘‰ Use UsageText in the help templates for commands and subcommands if defined; otherwise build the usage as before (was previously ignoring this field)
    • IsSet and GlobalIsSet now correctly return whether a flag is set if a program calls Set or GlobalSet directly after flag parsing (would previously only return true if the flag was set during parsing)

    ๐Ÿ”„ Changed

    • No longer exit the program on command/subcommand error if the error raised is not an OsExiter. This exiting behavior was introduced in 1.19.0, but was determined to be a regression in functionality. See the PR for discussion.

    โž• Added

    • CommandsByName type was added to make it easy to sort Commands by name, alphabetically
    • altsrc now handles loading of string and int arrays from TOML
    • ๐Ÿ‘Œ Support for definition of custom help templates for App via CustomAppHelpTemplate
    • ๐Ÿ‘Œ Support for arbitrary key/value fields on App to be used with CustomAppHelpTemplate via ExtraInfo
    • HelpFlag, VersionFlag, and BashCompletionFlag changed to explictly be cli.Flags allowing for the use of custom flags satisfying the cli.Flag interface to be used.