File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ Config file ($NERDCTL_TOML): %s
228228 // #endregion
229229
230230 // #region Container management
231+ newLogsCommand (),
231232 newPsCommand (),
232233 newPortCommand (),
233234 newStopCommand (),
@@ -246,6 +247,7 @@ Config file ($NERDCTL_TOML): %s
246247 newBuildCommand (),
247248
248249 // #region Image management
250+ newImagesCommand (),
249251 newPullCommand (),
250252 newPushCommand (),
251253 newLoadCommand (),
@@ -293,29 +295,12 @@ Config file ($NERDCTL_TOML): %s
293295 // IPFS
294296 newIPFSCommand (),
295297 )
296-
297298 addApparmorCommand (rootCmd )
298299 addCpCommand (rootCmd )
299- addLogsCommand (rootCmd )
300- addImagesCommand (rootCmd )
301300
302301 return rootCmd , nil
303302}
304303
305- func addLogsCommand (rootCmd * cobra.Command ) {
306- flagSet := rootCmd .PersistentFlags ()
307- // remove Shorthand flag -n (conflicts with nerdctl logs -n)
308- flagSet .ShorthandLookup ("n" ).Shorthand = ""
309- rootCmd .AddCommand (newLogsCommand ())
310- }
311-
312- func addImagesCommand (rootCmd * cobra.Command ) {
313- flagSet := rootCmd .PersistentFlags ()
314- // remove Shorthand flag -a (conflicts with nerdctl images -a)
315- flagSet .ShorthandLookup ("a" ).Shorthand = ""
316- rootCmd .AddCommand (newImagesCommand ())
317- }
318-
319304func globalFlags (cmd * cobra.Command ) (string , []string ) {
320305 args0 , err := os .Executable ()
321306 if err != nil {
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ require (
8989 github.com/hashicorp/errwrap v1.1.0 // indirect
9090 github.com/hashicorp/golang-lru v0.5.4 // indirect
9191 github.com/imdario/mergo v0.3.13 // indirect
92- github.com/inconshreveable/mousetrap v1.0.0 // indirect
92+ github.com/inconshreveable/mousetrap v1.0.1 // indirect
9393 github.com/ipfs/bbloom v0.0.4 // indirect
9494 github.com/ipfs/go-block-format v0.0.3 // indirect
9595 github.com/ipfs/go-blockservice v0.3.0 // indirect
@@ -185,4 +185,7 @@ replace (
185185 github.com/containerd/containerd => github.com/containerd/containerd v1.6.1-0.20220807041520-6deb1174fbfc
186186 // Temporary fork for avoiding importing patent-protected code: https://github.com/hashicorp/golang-lru/issues/73
187187 github.com/hashicorp/golang-lru => github.com/ktock/golang-lru v0.5.5-0.20211029085301-ec551be6f75c
188+ // Temporary fork for parent flags persistence: https://github.com/spf13/cobra/pull/1795
189+ github.com/spf13/cobra => github.com/fahedouch/cobra v0.0.0-20220905130657-0c653d6e38ad
190+ github.com/spf13/pflag => github.com/fahedouch/pflag v0.0.0-20220905133355-1113e9b3fb8b
188191)
You can’t perform that action at this time.
0 commit comments