fix: capture root command stdout (#2364)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow
2023-11-28 15:04:28 -05:00
committed by GitHub
parent ea4a6747eb
commit a50a0f77d2
3 changed files with 9 additions and 1 deletions
+3
View File
@@ -91,5 +91,8 @@ func create(id clio.Identification, out io.Writer) (clio.Application, *cobra.Com
cranecmd.NewCmdAuthLogin(id.Name), // syft login uses the same command as crane
)
// explicitly set Cobra output to the real stdout to write things like errors and help
rootCmd.SetOut(out)
return app, rootCmd
}