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
This commit is contained in:
Ondřej Míchal 2021-03-19 15:10:40 +01:00
parent 1c1808c9d3
commit 5c2086e9ea

View file

@ -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)
}