1
0
Fork 0
mirror of https://github.com/drone/drone-cli.git synced 2024-06-08 15:06:04 +02:00

Merge branch 'master' of github.com:drone/drone-cli into feature/template-config

This commit is contained in:
Eoin McAfee 2021-06-01 13:46:45 +01:00
commit 59a1b33230

View File

@ -41,7 +41,7 @@ var Command = cli.Command{
Name: "stream",
Usage: "Write output as a YAML stream.",
},
cli.BoolTFlag{
cli.BoolFlag{
Name: "format",
Usage: "Write output as formatted YAML",
},
@ -109,9 +109,8 @@ func generate(c *cli.Context) error {
buf.WriteString(result)
}
// the yaml file is parsed and formatted by default. This
// can be disabled for --format=false.
if c.BoolT("format") {
// enable yaml formatting with --format
if c.Bool("format") {
manifest, err := yaml.Parse(buf)
if err != nil {
return err