Skip to content

Commit

Permalink
output to stdout by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dkbednarczyk authored Nov 24, 2023
1 parent dc69af9 commit dc19c4c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@ func main() {

// utility cli flag to compile ruleset directory into single ruleset.yaml
if *mergeRulesets || *mergeRulesetsGzip {
output, err := os.Create(*mergeRulesetsOutput)
if err != nil {
fmt.Println(err)
os.Exit(1)
output := os.Stdout

if *mergeRulesetsOutput != "" {
output, err = os.Create(*mergeRulesetsOutput)

if err != nil {
fmt.Println(err)
os.Exit(1)
}
}

err = cli.HandleRulesetMerge(*ruleset, *mergeRulesets, *mergeRulesetsGzip, output)
Expand Down

0 comments on commit dc19c4c

Please sign in to comment.