Skip to content

Commit

Permalink
Fix helm output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok committed Jul 17, 2023
1 parent aed3a23 commit 0f04b86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/executor/helm/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ func (e *Executor) Execute(ctx context.Context, in executor.ExecuteInput) (execu
return e.handleHelmCommand(ctx, helmCmd.Get.Values, cfg, wasHelpRequested, in.Command, kubeConfigPath)
default:
return executor.ExecuteOutput{
Data: helmCmd.Get.Help(),
Message: api.NewCodeBlockMessage(helmCmd.Get.Help(), true),
}, nil
}
default:
return executor.ExecuteOutput{
Data: "Helm command not supported",
Message: api.NewCodeBlockMessage("Helm command not supported", true),
}, nil
}
}
Expand All @@ -171,7 +171,7 @@ func (*Executor) Help(context.Context) (api.Message, error) {
func (e *Executor) handleHelmCommand(ctx context.Context, cmd command, cfg Config, wasHelpRequested bool, rawCmd, kubeConfig string) (executor.ExecuteOutput, error) {
if wasHelpRequested {
return executor.ExecuteOutput{
Data: cmd.Help(),
Message: api.NewCodeBlockMessage(cmd.Help(), true),
}, nil
}

Expand All @@ -193,7 +193,7 @@ func (e *Executor) handleHelmCommand(ctx context.Context, cmd command, cfg Confi
}

return executor.ExecuteOutput{
Message: api.NewPlaintextMessage(out.Stdout, true),
Message: api.NewCodeBlockMessage(out.Stdout, true),
}, nil
}

Expand Down

0 comments on commit 0f04b86

Please sign in to comment.