mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: go-github-com-urfave-cli-v2: Update to 2.27.5.
* gnu/packages/golang.scm (go-github-com-urfave-cli-v2): Update to 2.27.5. [source]<patches>: Remove patch as no longer required. [propagated-inputs]: Add go-github-com-burntsushi-toml, go-github-com-go-md2man, go-github-com-xrash-smetrics, and go-gopkg-in-yaml-v3. * gnu/packages/patches/go-github-com-urfave-cli-fix-v2-tests.patch: Delete file. * gnu/local.mk: Deregister patch. Change-Id: I18c5b778b18d44bb8a6508440174cd87f5ec390a
This commit is contained in:
parent
94cefaab3a
commit
b789eff407
3 changed files with 8 additions and 44 deletions
|
@ -1506,7 +1506,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/go-fix-script-tests.patch \
|
%D%/packages/patches/go-fix-script-tests.patch \
|
||||||
%D%/packages/patches/go-gopkg-in-yaml-v3-32bit.patch \
|
%D%/packages/patches/go-gopkg-in-yaml-v3-32bit.patch \
|
||||||
%D%/packages/patches/go-github-com-golang-snappy-32bit-test.patch \
|
%D%/packages/patches/go-github-com-golang-snappy-32bit-test.patch \
|
||||||
%D%/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch \
|
|
||||||
%D%/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch \
|
%D%/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch \
|
||||||
%D%/packages/patches/go-github-com-wraparound-wrap-free-fonts.patch \
|
%D%/packages/patches/go-github-com-wraparound-wrap-free-fonts.patch \
|
||||||
%D%/packages/patches/go-skip-gc-test.patch \
|
%D%/packages/patches/go-skip-gc-test.patch \
|
||||||
|
|
|
@ -4242,7 +4242,7 @@ fast and distributable command line applications in an expressive way.")
|
||||||
(package
|
(package
|
||||||
(inherit go-github-com-urfave-cli)
|
(inherit go-github-com-urfave-cli)
|
||||||
(name "go-github-com-urfave-cli-v2")
|
(name "go-github-com-urfave-cli-v2")
|
||||||
(version "2.3.0")
|
(version "2.27.5")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -4251,12 +4251,14 @@ fast and distributable command line applications in an expressive way.")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "08pvn7gyfznni72xrxfh2x6xxa8ykr7l1ka278js8g8qkh71bj8l"))
|
(base32 "03237hi2jqvms9cif4varyap3j1dhzcf1mr809dm7ncvzk7gxg83"))))
|
||||||
;; XXX: Remove patch when updating.
|
|
||||||
(patches
|
|
||||||
(search-patches "go-github-com-urfave-cli-v2-fix-tests.patch"))))
|
|
||||||
(arguments
|
(arguments
|
||||||
'(#:import-path "github.com/urfave/cli/v2"))))
|
'(#:import-path "github.com/urfave/cli/v2"))
|
||||||
|
(propagated-inputs
|
||||||
|
(list go-github-com-burntsushi-toml
|
||||||
|
go-github-com-go-md2man
|
||||||
|
go-github-com-xrash-smetrics
|
||||||
|
go-gopkg-in-yaml-v3))))
|
||||||
|
|
||||||
(define-public go-github-com-go-md2man
|
(define-public go-github-com-go-md2man
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
From upstream PR: https://github.com/urfave/cli/pull/1299
|
|
||||||
|
|
||||||
From: William Wilson <william.wilson@canonical.com>
|
|
||||||
Date: Tue, 31 Aug 2021 14:19:17 -0500
|
|
||||||
Subject: Make test case compatible with Go 1.17
|
|
||||||
|
|
||||||
As of Go 1.17, the go flag package will panic if given a syntactically invalid
|
|
||||||
flag. This causes TestApp_RunAsSubCommandIncorrectUsage to panic and therefore
|
|
||||||
fail. See https://golang.org/doc/go1.17#flag for more information.
|
|
||||||
|
|
||||||
---
|
|
||||||
diff --git a/app_test.go b/app_test.go
|
|
||||||
index 7c38f6048..76e211d68 100644
|
|
||||||
--- a/app_test.go
|
|
||||||
+++ b/app_test.go
|
|
||||||
@@ -476,18 +476,18 @@ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
|
|
||||||
a := App{
|
|
||||||
Name: "cmd",
|
|
||||||
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) {
|
|
Loading…
Add table
Add a link
Reference in a new issue