Skip to content

Commit

Permalink
fix(climc): add args option for container/pod-exec (#20352)
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi authored May 24, 2024
1 parent 152b00d commit f348c04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/mcclient/options/compute/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,14 @@ type ContainerExecOptions struct {
ServerIdOptions
// Tty bool `help:"Using tty" short-token:"t"`
COMMAND string
Args []string
}

func (o *ContainerExecOptions) ToAPIInput() *computeapi.ContainerExecInput {
cmd := []string{o.COMMAND}
cmd = append(cmd, o.Args...)
return &computeapi.ContainerExecInput{
Command: strings.Split(o.COMMAND, " "),
Command: cmd,
//Tty: o.Tty,
Tty: true,
}
Expand Down

0 comments on commit f348c04

Please sign in to comment.