Skip to content

Releases: urfave/cli

Release 1.22.1

12 Sep 00:07
c71fbce
Compare
Choose a tag to compare

🚧 Watch out! There's a known regression in this release! #850 🚧

Fixed

Changed

Release 1.22.0

10 Sep 00:59
bfe2e92
Compare
Choose a tag to compare

🚧 Watch out! There's a known regression in this release! #850 🚧

Fixed

Changed

Added

Release 1.21.0

04 Aug 02:42
e6cf83e
Compare
Choose a tag to compare

🚧 Watch out! There's a known regression in this release! #850 🚧

Fixed

Added / Changed

cli v1.19.1

22 Nov 04:37
Compare
Choose a tag to compare

Fixed

  • Fixes regression introduced in 1.19.0 where using an ActionFunc as
    the Action for a command would cause it to error rather than calling the
    function. Should not have a affected declarative cases using func(c *cli.Context) err).
  • Shell completion now handles the case where the user specifies
    --generate-bash-completion immediately after a flag that takes an argument.
    Previously it call the application with --generate-bash-completion as the
    flag value.

cli v1.19.0

19 Nov 19:04
Compare
Choose a tag to compare

Added

  • FlagsByName was added to make it easy to sort flags (e.g. sort.Sort(cli.FlagsByName(app.Flags)))
  • A Description field was added to App for a more detailed description of
    the application (similar to the existing Description field on Command)
  • Flag type code generation via go generate
  • Write to stderr and exit 1 if action returns non-nil error
  • Added support for TOML to the altsrc loader
  • SkipArgReorder was added to allow users to skip the argument reordering.
    This is useful if you want to consider all "flags" after an argument as
    arguments rather than flags (the default behavior of the stdlib flag
    library). This is backported functionality from the removal of the flag
    reordering
    in the unreleased version
    2
  • For formatted errors (those implementing ErrorFormatter), the errors will
    be formatted during output. Compatible with pkg/errors.

Changed

  • Raise minimum tested/supported Go version to 1.2+

Fixed

  • Consider empty environment variables as set (previously environment variables
    with the equivalent of "" would be skipped rather than their value used).
  • Return an error if the value in a given environment variable cannot be parsed
    as the flag type. Previously these errors were silently swallowed.
  • Print full error when an invalid flag is specified (which includes the invalid flag)
  • App.Writer defaults to stdout when nil
  • If no action is specified on a command or app, the help is now printed instead of panicing
  • App.Metadata is initialized automatically now (previously was nil unless initialized)
  • Correctly show help message if -h is provided to a subcommand
  • context.(Global)IsSet now respects environment variables. Previously it
    would return false if a flag was specified in the environment rather than
    as an argument
  • Removed deprecation warnings to STDERR to avoid them leaking to the end-user
  • altsrcs import paths were updated to use gopkg.in/urfave/cli.v1. This
    fixes issues that occurred when gopkg.in/urfave/cli.v1 was imported as well
    as altsrc where Go would complain that the types didn't match

cli v1.18.1

29 Aug 00:53
Compare
Choose a tag to compare

Fixed

  • Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)

cli v1.17.1

29 Aug 00:50
Compare
Choose a tag to compare

Fixed

  • Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)

cli v1.16.1

29 Aug 00:48
Compare
Choose a tag to compare

Fixed

  • Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)

v1.18.0

28 Jun 05:34
Compare
Choose a tag to compare

Added

  • ./runtests test runner with coverage tracking by default
  • testing on OS X
  • testing on Windows
  • UintFlag, Uint64Flag, and Int64Flag types and supporting code

Changed

  • Use spaces for alignment in help/usage output instead of tabs, making the
    output alignment consistent regardless of tab width

Fixed

  • Printing of command aliases in help text
  • Printing of visible flags for both struct and struct pointer flags
  • Display the help subcommand when using CommandCategories
  • No longer swallows panics that occur within the Actions themselves when
    detecting the signature of the Action field

v1.17.0

09 May 15:15
Compare
Choose a tag to compare

Added

  • Pluggable flag-level help text rendering via cli.DefaultFlagStringFunc
  • context.GlobalBoolT was added as an analogue to context.GlobalBool
  • Support for hiding commands by setting Hidden: true -- this will hide the
    commands in help output

Changed

  • Float64Flag, IntFlag, and DurationFlag default values are no longer
    quoted in help text output.
  • All flag types now include (default: {value}) strings following usage when a
    default value can be (reasonably) detected.
  • IntSliceFlag and StringSliceFlag usage strings are now more consistent
    with non-slice flag types
  • Apps now exit with a code of 3 if an unknown subcommand is specified
    (previously they printed "No help topic for...", but still exited 0. This
    makes it easier to script around apps built using cli since they can trust
    that a 0 exit code indicated a successful execution.
  • cleanups based on Go Report Card
    feedback