From 902ba89cf77eab7a0dcbc78b934d181854e114de Mon Sep 17 00:00:00 2001 From: Binaek Sarkar Date: Mon, 3 Apr 2023 16:13:00 +0530 Subject: [PATCH] Fixes issue where execution continues even if there's an unexpected error in parsing config. Closes #3286 --- cmd/root.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 4803f43637..8d96a18cfd 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -58,12 +58,6 @@ var rootCmd = &cobra.Command{ utils.LogTime("cmd.root.PersistentPreRun start") defer utils.LogTime("cmd.root.PersistentPreRun end") - defer func() { - if r := recover(); r != nil { - error_helpers.ShowError(cmd.Context(), helpers.ToError(r)) - } - }() - handleArgDeprecations() viper.Set(constants.ConfigKeyActiveCommand, cmd)