Skip to content

Commit

Permalink
Don't print usage when command execution errs out. (#2466)
Browse files Browse the repository at this point in the history
  • Loading branch information
kislaykishore authored Sep 12, 2024
1 parent 0e7c889 commit da7b0cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ func NewRootCmd(m mountFn) (*cobra.Command, error) {
Long: `Cloud Storage FUSE is an open source FUSE adapter that lets you mount
and access Cloud Storage buckets as local file systems. For a technical overview
of Cloud Storage FUSE, see https://cloud.google.com/storage/docs/gcs-fuse.`,
Version: common.GetVersion(),
Args: cobra.RangeArgs(2, 3),
Version: common.GetVersion(),
Args: cobra.RangeArgs(2, 3),
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
if cfgErr != nil {
return fmt.Errorf("error while parsing config: %w", cfgErr)
Expand Down

0 comments on commit da7b0cf

Please sign in to comment.