Explorar o código

etcdctl: unset ETCDCTL_ARGS on cov builds

The stricter warnings on pkg/flags generates extra output that
break coverage tests. Unset the ETCDCTL_ARGS environment variable
so the warnings aren't printed.
Anthony Romano %!s(int64=8) %!d(string=hai) anos
pai
achega
1dea4c688e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      etcdctl/ctlv3/ctl_cov.go

+ 1 - 0
etcdctl/ctlv3/ctl_cov.go

@@ -27,6 +27,7 @@ func Start() {
 	// ETCDCTL_ARGS=etcdctl_test arg1 arg2...
 	// SetArgs() takes arg1 arg2...
 	rootCmd.SetArgs(strings.Split(os.Getenv("ETCDCTL_ARGS"), "\xe7\xcd")[1:])
+	os.Unsetenv("ETCDCTL_ARGS")
 	if err := rootCmd.Execute(); err != nil {
 		command.ExitWithError(command.ExitError, err)
 	}