[ARVADOS] created: 2.1.0-975-g9ba2175c6
Git user
git at public.arvados.org
Tue Jun 29 14:12:13 UTC 2021
at 9ba2175c6a385ebe188e9c1f008ea221a1ae7710 (commit)
commit 9ba2175c6a385ebe188e9c1f008ea221a1ae7710
Author: Tom Clegg <tom at curii.com>
Date: Tue Jun 29 10:11:40 2021 -0400
17840: Check for unparsed command line arguments.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keep-balance/main.go b/services/keep-balance/main.go
index 8b4ee84c7..8c4738c8d 100644
--- a/services/keep-balance/main.go
+++ b/services/keep-balance/main.go
@@ -42,7 +42,15 @@ func runCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.W
loader.SetupFlags(flags)
munged := loader.MungeLegacyConfigArgs(logger, args, "-legacy-keepbalance-config")
- flags.Parse(munged)
+ err := flags.Parse(munged)
+ if err != nil {
+ logger.Errorf("error parsing command line flags: %s", err)
+ return 2
+ }
+ if flags.NArg() != 0 {
+ logger.Errorf("error parsing command line flags: extra arguments: %q", flags.Args())
+ return 2
+ }
if *dumpFlag {
dumper := logrus.New()
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list