Skip to content

Commit

Permalink
style: fetch disable-osc-progress flag and handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Dec 25, 2024
1 parent 32ffd4c commit 281b7ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 281b7ad

Please sign in to comment.