fix: Use stdin/out defined in command (#3199)

This commit is contained in:
Mathias Fredriksson
2022-07-26 17:23:32 +03:00
committed by GitHub
parent 9fe260d5ea
commit 159137dc10
8 changed files with 14 additions and 21 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ func update() *cobra.Command {
return err
}
if !workspace.Outdated && !alwaysPrompt {
_, _ = fmt.Printf("Workspace isn't outdated!\n")
_, _ = fmt.Fprintf(cmd.OutOrStdout(), "Workspace isn't outdated!\n")
return nil
}
template, err := client.Template(cmd.Context(), workspace.TemplateID)
@@ -74,7 +74,7 @@ func update() *cobra.Command {
if !ok {
break
}
_, _ = fmt.Printf("Output: %s\n", log.Output)
_, _ = fmt.Fprintf(cmd.OutOrStdout(), "Output: %s\n", log.Output)
}
return nil
},