From 0832ccd136d1a6fd6ad44eaa2d6a6c120a54c5a9 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 10 Dec 2024 17:26:48 +0100 Subject: [PATCH] refactor: Simplify flag deprecation and completion registration --- cmd/root/bundle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root/bundle.go b/cmd/root/bundle.go index 5d7e8909e..a9521a597 100644 --- a/cmd/root/bundle.go +++ b/cmd/root/bundle.go @@ -153,6 +153,6 @@ func initTargetFlag(cmd *cobra.Command) { func initEnvironmentFlag(cmd *cobra.Command) { // To operate in the context of a bundle, all commands must take an "environment" parameter. cmd.PersistentFlags().StringP("environment", "e", "", "bundle target to use (if applicable)") - _ = cmd.PersistentFlags().MarkDeprecated("environment", "use --target flag instead") - _ = cmd.RegisterFlagCompletionFunc("environment", targetCompletion) + cmd.PersistentFlags().MarkDeprecated("environment", "use --target flag instead") + cmd.RegisterFlagCompletionFunc("environment", targetCompletion) }