From 5c2086e9ea045f73bdc574734d659807a2d68d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20M=C3=ADchal?= Date: Fri, 19 Mar 2021 15:10:40 +0100 Subject: [PATCH] cmd/initContainer: Ignore unknown flags The init-container command uses several flags. In the future we'd like to minimize their number. In order to be able to do that without breaking systems with older versions of Toolbox, the command can't error out due to usage of unknown flags. https://github.com/containers/toolbox/pull/724 --- src/cmd/initContainer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/initContainer.go b/src/cmd/initContainer.go index d64c0dc..d74d14d 100644 --- a/src/cmd/initContainer.go +++ b/src/cmd/initContainer.go @@ -122,6 +122,7 @@ func init() { "Create a user inside the toolbox container whose login name is USER") initContainerCmd.MarkFlagRequired("user") + initContainerCmd.FParseErrWhitelist.UnknownFlags = true initContainerCmd.SetHelpFunc(initContainerHelp) rootCmd.AddCommand(initContainerCmd) }