From upstream PR: https://github.com/urfave/cli/pull/1299 From: William Wilson 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) { a>treecommitdiff
path: root/etc/init.d
AgeCommit message (Expand)Author
2024-06-26etc: Add explicit ‘--substitute-urls’ in guix-daemon service files....Having substitute URLs explicitly listed in the service startup file makes it clearer what should be modified to permanently change the list of substitute URLs. * config-daemon.ac: Rename ‘guix_substitute_urls’ to ‘GUIX_SUBSTITUTE_URLS’ and substitute it. * nix/local.mk (etc/guix-%.service, etc/init.d/guix-daemon) (etc/guix-%.conf): Substitute it. * etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/init.d/guix-daemon.in: Add an explicit ‘--substitute-urls’ option. Change-Id: Ie491b7fab5c42e54dca582801c03805a85de2bf9 Ludovic Courtès
2021-07-07guix-install.sh: Prompt for configuring substitutes discovery....Also ensure prompt_yes_no always print the message with a trailing space, which is more pleasing to the eye. * etc/guix-daemon.conf.in <--discover=no>: New guix-daemon option. * etc/guix-daemon.service.in: Likewise. * etc/init.d/guix-daemon.in: Likewise. * etc/openrc/guix-daemon.in: Likewise. * etc/guix-install.sh (configure_substitute_discovery): New procedure. (sys_enable_guix_daemon): Ask the user whether automatic substitute discovery should be enabled. Set the '--discover' argument accordingly. (prompt_yes_no): Add a trailing space to the message. (sys_authorize_build_farms): Remove trailing space from the message argument. * NEWS (Distribution): Add news. Maxim Cournoyer