From 281b7ad411db48875460897212832cd04bd44a97 Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Wed, 25 Dec 2024 12:28:51 -0800 Subject: [PATCH] style: fetch disable-osc-progress flag and handle error --- cmd/update.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/update.go b/cmd/update.go index eea07b2..9a3ea8c 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -50,6 +50,11 @@ func Update(cmd *cobra.Command, args []string) { slog.Error("Failed to get verbose flag", "error", err) return } + disableOsc, err := cmd.Flags().GetBool("disable-osc-progress") + if err != nil { + slog.Error("Failed to get disable-osc-progress flag", "error", err) + return + } if hwCheck { err := checks.RunHwChecks() @@ -98,7 +103,6 @@ func Update(cmd *cobra.Command, args []string) { totalSteps += mainSystemDriver.Steps() } - disableOsc, err := cmd.Flags().GetBool("disable-osc-progress") if !disableOsc { percent.ResetOscProgress() }