mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-03 00:28:50 +00:00
Use stdout when exporting objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
46aa068fda
commit
f719d2bf76
7 changed files with 19 additions and 32 deletions
|
|
@ -109,13 +109,13 @@ func (export exportCommand) run(cmd *cobra.Command, args []string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func printExport(export interface{}) error {
|
||||
func printExport(export any) error {
|
||||
data, err := yaml.Marshal(export)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rootCmd.Println("---")
|
||||
rootCmd.Println(resourceToString(data))
|
||||
printlnStdout("---")
|
||||
printlnStdout(resourceToString(data))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue