Skip to content

Commit

Permalink
Merge pull request #2453 from rancher/cli-deploy-stderr
Browse files Browse the repository at this point in the history
CLI deploy prints to stdout
  • Loading branch information
manno authored May 24, 2024
2 parents bc38b9b + e3a16ce commit f5312fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/cmd/cli/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func NewDeploy() *cobra.Command {
cmd := command.Command(&Deploy{}, cobra.Command{
Short: "Deploy a bundledeployment/content resource to a cluster, by creating a Helm release. This will not deploy the bundledeployment/content resources directly to the cluster.",
})
cmd.SetOut(os.Stdout)

// add command line flags from zap and controller-runtime, which use
// goflags and convert them to pflags
fs := flag.NewFlagSet("", flag.ExitOnError)
Expand Down Expand Up @@ -69,6 +71,8 @@ func (d *Deploy) Run(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}

// position of the content and bundledeployment resources in the file is not guaranteed
for _, obj := range objs {
switch obj.GetObjectKind().GroupVersionKind().Kind {
case "Content":
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/cli/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func NewTarget() *cobra.Command {
Short: "Print available targets for a bundle",
})
cmd.SetOut(os.Stdout)

// add command line flags from zap and controller-runtime, which use
// goflags and convert them to pflags
fs := flag.NewFlagSet("", flag.ExitOnError)
Expand Down

0 comments on commit f5312fd

Please sign in to comment.