Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 31f89d0

Browse files
authored
Merge pull request #373 from joshwget/quiet-flag
Implement quiet flag for config subcommand
2 parents 67604d0 + 3c7aa41 commit 31f89d0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cli/app/app.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ func ProjectConfig(p project.APIProject, c *cli.Context) error {
282282
if err != nil {
283283
return cli.NewExitError(err.Error(), 1)
284284
}
285-
fmt.Println(yaml)
285+
if !c.Bool("quiet") {
286+
fmt.Println(yaml)
287+
}
286288
return nil
287289
}
288290

cli/command/command.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ func ConfigCommand(factory app.ProjectFactory) cli.Command {
5959
Name: "config",
6060
Usage: "Validate and view the compose file.",
6161
Action: app.WithProject(factory, app.ProjectConfig),
62+
Flags: []cli.Flag{
63+
cli.BoolFlag{
64+
Name: "quiet,q",
65+
Usage: "Only validate the configuration, don't print anything.",
66+
},
67+
},
6268
}
6369
}
6470

0 commit comments

Comments
 (0)