diff options
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/golang.scm | 3 | ||||
-rw-r--r-- | gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index b08796e22a..2d0bbdb30d 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -4976,7 +4976,8 @@ as conversion to and from @command{net.Addr}.") (file-name (git-file-name name version)) (sha256 (base32 - "10mcnvi5qmn00vpyk6si8gjka7p654wr9hac4zc9w5h3ickhvbdc")))) + "10mcnvi5qmn00vpyk6si8gjka7p654wr9hac4zc9w5h3ickhvbdc")) + (patches (search-patches "go-github-com-urfave-cli-fix-tests.patch")))) (build-system go-build-system) (arguments '(#:import-path "github.com/urfave/cli")) diff --git a/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch new file mode 100644 index 0000000000..7408d4ec16 --- /dev/null +++ b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch @@ -0,0 +1,28 @@ +Backported from upstream PR: https://github.com/urfave/cli/pull/1299 +--- +diff --git a/app_test.go b/app_test.go +index 33024ff..6b3aaa3 100644 +--- a/app_test.go ++++ b/app_test.go +@@ -513,18 +513,18 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) { + func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) { + a := App{ + Flags: []Flag{ +- StringFlag{Name: "--foo"}, ++ StringFlag{Name: "foo"}, + }, + Writer: bytes.NewBufferString(""), + } + + set := flag.NewFlagSet("", flag.ContinueOnError) +- _ = set.Parse([]string{"", "---foo"}) ++ _ = set.Parse([]string{"", "-bar"}) + c := &Context{flagSet: set} + + err := a.RunAsSubcommand(c) + +- expect(t, err, errors.New("bad flag syntax: ---foo")) ++ expect(t, err.Error(), "flag provided but not defined: -bar") + } + + func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) { |