Skip to content

Commit

Permalink
fix(run): Remove additional log entries to make usage more UNIX-like
Browse files Browse the repository at this point in the history
This commit returns the machine name such that the output of `kraft run`
can be pushed through a UNIX pipe, allowing for greater ease-of-use.

Signed-off-by: Alexander Jung <alex@unikraft.io>
  • Loading branch information
nderjung authored and zyllee committed Jun 24, 2023
1 parent 0155e4a commit 2f33ef3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/kraft/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,16 @@ func (opts *Run) Run(cmd *cobra.Command, args []string) error {

// Remove the instance on Ctrl+C if the --rm flag is passed
if opts.Remove {
<<<<<<< HEAD
if _, err := opts.machineController.Stop(ctx, machine); err != nil {
return errors.Errorf("could not stop: %v", err)
}
if _, err := opts.machineController.Delete(ctx, machine); err != nil {
return errors.Errorf("could not remove: %v", err)
=======
if _, err := controller.Delete(ctx, machine); err != nil {
return fmt.Errorf("could not remove: %v", err)
>>>>>>> 4263c17 (fix(run): Remove additional log entries to make usage more UNIX-like)
}
}
} else {
Expand Down

0 comments on commit 2f33ef3

Please sign in to comment.