Skip to content

Commit

Permalink
fix(run): When no user args are specified use the package's (#941)
Browse files Browse the repository at this point in the history
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
  • Loading branch information
craciunoiuc committed Oct 26, 2023
2 parents 6086736 + c8962b6 commit dd11800
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/cli/kraft/run/runner_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ func (runner *runnerPackage) Prepare(ctx context.Context, opts *RunOptions, mach
machine.Spec.Architecture = targ.Architecture().Name()
machine.Spec.Platform = targ.Platform().Name()
machine.Spec.Kernel = fmt.Sprintf("%s://%s", runner.pm.Format(), runner.packName)

// If no arguments have been specified, use the ones which are default and
// that have been included in the package.
if len(runner.args) == 0 {
runner.args = targ.Command()
}

machine.Spec.ApplicationArgs = runner.args

// Set the path to the initramfs if present.
Expand Down

0 comments on commit dd11800

Please sign in to comment.