fix: remove duplicate error message

closes #30857

There are 2 ways the error message from any subcommand is printed:
1. through the debug log line that this PR removes
2. through the spf13/cobra package before the error type is returned to
   the caller.

Since the spf13/cobra package already prints out the error, there is no
use in redundantly printing out the error again within the debug log
line.

Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
pull/30864/head
Jesse Simpson 4 months ago
parent dd40316660
commit 098486d221
No known key found for this signature in database
GPG Key ID: 237495C89AB0AAFC

@ -41,7 +41,6 @@ func main() {
} }
if err := cmd.Execute(); err != nil { if err := cmd.Execute(); err != nil {
slog.Debug("error", slog.Any("error", err))
switch e := err.(type) { switch e := err.(type) {
case helmcmd.PluginError: case helmcmd.PluginError:
os.Exit(e.Code) os.Exit(e.Code)

Loading…
Cancel
Save