Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename --mute to --quiet #41

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ k6registry [flags] [source-file]

```
-o, --out string write output to file instead of stdout
-m, --mute no output, only validation
-q, --quiet no output, only validation
--loose skip JSON schema validation
--lint enable built-in linter
-c, --compact compact instead of pretty-printed output
Expand Down
8 changes: 4 additions & 4 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var help string
type options struct {
out string
compact bool
mute bool
quiet bool
loose bool
lint bool
}
Expand Down Expand Up @@ -57,11 +57,11 @@ func New() (*cobra.Command, error) {
flags.SortFlags = false

flags.StringVarP(&opts.out, "out", "o", "", "write output to file instead of stdout")
flags.BoolVarP(&opts.mute, "mute", "m", false, "no output, only validation")
flags.BoolVarP(&opts.quiet, "quiet", "q", false, "no output, only validation")
flags.BoolVar(&opts.loose, "loose", false, "skip JSON schema validation")
flags.BoolVar(&opts.lint, "lint", false, "enable built-in linter")
flags.BoolVarP(&opts.compact, "compact", "c", false, "compact instead of pretty-printed output")
root.MarkFlagsMutuallyExclusive("compact", "mute")
root.MarkFlagsMutuallyExclusive("compact", "quiet")

flags.BoolP("version", "V", false, "print version")

Expand Down Expand Up @@ -115,7 +115,7 @@ func run(ctx context.Context, args []string, opts *options) (result error) {
return err
}

if opts.mute {
if opts.quiet {
return nil
}

Expand Down
Loading