Skip to content

Commit

Permalink
fix output command print
Browse files Browse the repository at this point in the history
  • Loading branch information
speier committed Dec 13, 2024
1 parent bfa3776 commit b201e03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/output.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cmd

import (
"fmt"

"github.com/spf13/cobra"

"github.com/moonwalker/comet/internal/log"
Expand All @@ -22,9 +24,14 @@ func init() {

func output(cmd *cobra.Command, args []string) {
run(args, false, func(component *schema.Component, executor schema.Executor) {
_, err := executor.Output(component)
out, err := executor.Output(component)
if err != nil {
log.Fatal(err)
}

for k, v := range out {
s := fmt.Sprintf(`%s = "%s"`, k, v)
fmt.Println(s)
}
})
}

0 comments on commit b201e03

Please sign in to comment.