Skip to content

Commit

Permalink
feature(4890): added fatal log in case there is an error while markin…
Browse files Browse the repository at this point in the history
…g force flag as hidden
  • Loading branch information
kaanyalti committed Nov 7, 2024
1 parent 05195ae commit 21b09af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/pkg/agent/cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package cmd
import (
"context"
"fmt"
"log"
"os"
"strings"

Expand Down Expand Up @@ -57,7 +58,10 @@ func newUpgradeCommandWithArgs(_ []string, streams *cli.IOStreams) *cobra.Comman
cmd.Flags().String(flagPGPBytesURI, "", "Path to a web location containing PGP to use for package verification")
cmd.Flags().String(flagPGPBytesPath, "", "Path to a file containing PGP to use for package verification")
cmd.Flags().BoolP(flagForce, "f", false, "Advanced option to force an upgrade on a fleet managed agent")
cmd.Flags().MarkHidden(flagForce)
err := cmd.Flags().MarkHidden(flagForce)
if err != nil {
log.Fatal(err)
}

return cmd
}
Expand Down

0 comments on commit 21b09af

Please sign in to comment.