Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #49 from redskyops/fix/filter-output
Browse files Browse the repository at this point in the history
Silence stderr on the forked exec
  • Loading branch information
jgustie authored May 1, 2020
2 parents 7c1a611 + 62421f3 commit fab0a90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions redskyctl/internal/commands/initialize/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ func (o *GeneratorOptions) generate(ctx context.Context) error {
args = append(args, "--", "install")

// Run the command straight through to the configured output stream
// TODO How do we filter out the warning about not being able to attach?
kubectlRun, err := o.Config.Kubectl(ctx, args...)
if err != nil {
return err
}
// TODO Should we buffer this and verify we got valid YAML?
kubectlRun.Stdout = o.Out
kubectlRun.Stderr = o.ErrOut
// TODO What is the best way to filter out the "Error attaching, ..." line from the writer?
// kubectlRun.Stderr = o.ErrOut
return kubectlRun.Run()
}

0 comments on commit fab0a90

Please sign in to comment.