Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmd/rig/cmd/capsule/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ func (c *Cmd) deploy(ctx context.Context, cmd *cobra.Command, args []string) err
}

func (c *Cmd) getNewSpec(ctx context.Context, cmd *cobra.Command, args []string) (*platformv1.Capsule, error) {
var extraArgs []string
if cmd.ArgsLenAtDash() >= 0 {
extraArgs = args[cmd.ArgsLenAtDash():]
args = args[:cmd.ArgsLenAtDash()]
}

if file != "" {
if environmentVariables != nil ||
removeEnvironmentVariables != nil ||
Expand Down Expand Up @@ -453,8 +459,7 @@ func (c *Cmd) getNewSpec(ctx context.Context, cmd *cobra.Command, args []string)
}

// Command and arguments.
if idx := cmd.ArgsLenAtDash(); idx >= 0 {
extraArgs := args[idx:]
if extraArgs != nil {
if len(extraArgs) == 0 {
spec.Spec.Command = ""
spec.Spec.Args = nil
Expand Down