Skip to content

Commit

Permalink
addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
droot committed Nov 1, 2022
1 parent 6088d7a commit c0612fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions commands/alpha/rpkg/push/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,15 @@ func (r *runner) runE(cmd *cobra.Command, args []string) error {
} else {
r.printer.OptPrintf(printOpt, "[PASS] %q\n", result.Image)
}
printFnResult(r.ctx, result, printOpt)
r.printFnResult(result, printOpt)
}
}
return nil
}

// printFnResult prints given function result in a user friendly
// format on kpt CLI.
func printFnResult(ctx context.Context, fnResult *porchapi.Result, opt *printer.Options) {
pr := printer.FromContextOrDie(ctx)
func (r *runner) printFnResult(fnResult *porchapi.Result, opt *printer.Options) {
if len(fnResult.Results) > 0 {
// function returned structured results
var lines []string
Expand All @@ -170,7 +169,7 @@ func printFnResult(ctx context.Context, fnResult *porchapi.Result, opt *printer.
Lines: lines,
TruncateOutput: printer.TruncateOutput,
}
pr.OptPrintf(opt, "%s", ri.String())
r.printer.OptPrintf(opt, "%s", ri.String())
}
}

Expand Down

0 comments on commit c0612fc

Please sign in to comment.