Skip to content
Draft
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
27 changes: 25 additions & 2 deletions cmd/limactl/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,12 +549,35 @@
if len(inst.Errors) > 0 {
return fmt.Errorf("errors inspecting instance: %+v", inst.Errors)
}
if _, err = instance.Prepare(cmd.Context(), inst, ""); err != nil {
ctx := cmd.Context()
if _, err = instance.Prepare(ctx, inst, ""); err != nil {
return err
}
tty, err := cmd.Flags().GetBool("tty")
if err != nil {
return err
}

startNow := false
if tty {
startNow, err = askWhetherToStart()
if err != nil {
return err
}
}

if !startNow {
logrus.Infof("Run `limactl start %s` to start the instance.", inst.Name)
return nil
}

if err := instance.Start(ctx, inst, false, false); err != nil {
return err
}
logrus.Infof("Run `limactl start %s` to start the instance.", inst.Name)

return nil

Check failure on line 579 in cmd/limactl/start.go

View workflow job for this annotation

GitHub Actions / Lint Go (ubuntu-24.04)

File is not properly formatted (gofumpt)
}

Check failure on line 580 in cmd/limactl/start.go

View workflow job for this annotation

GitHub Actions / Lint Go (ubuntu-24.04)

unnecessary trailing newline (whitespace)

func startAction(cmd *cobra.Command, args []string) error {
if exit, err := createStartActionCommon(cmd, args); err != nil {
Expand Down
Loading