ctr: print deprecation warnings on every invocation
Print deprecation warnings on any ctr command, as users won't notice the deprecations until we actually remove the deprecated features. The warnings can be suppressed by setting `CONTAINERD_SUPPRESS_DEPRECATION_WARNINGS=1`. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -47,6 +47,9 @@ var listCommand = cli.Command{
|
||||
},
|
||||
},
|
||||
Action: func(context *cli.Context) error {
|
||||
// Suppress automatic warnings, since we print the warnings by ourselves.
|
||||
os.Setenv("CONTAINERD_SUPPRESS_DEPRECATION_WARNINGS", "1")
|
||||
|
||||
client, ctx, cancel, err := commands.NewClient(context)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user