File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -549,10 +549,24 @@ func createAction(cmd *cobra.Command, args []string) error {
549549 if len (inst .Errors ) > 0 {
550550 return fmt .Errorf ("errors inspecting instance: %+v" , inst .Errors )
551551 }
552- if _ , err = instance .Prepare (cmd .Context (), inst , "" ); err != nil {
552+ ctx := cmd .Context ()
553+ if _ , err = instance .Prepare (ctx , inst , "" ); err != nil {
554+ return err
555+ }
556+
557+ startNow , err := askWhetherToStart ()
558+ if err != nil {
553559 return err
554560 }
555- logrus .Infof ("Run `limactl start %s` to start the instance." , inst .Name )
561+ if ! startNow {
562+ logrus .Infof ("Run `limactl start %s` to start the instance." , inst .Name )
563+ return nil
564+ }
565+
566+ if err := instance .Start (ctx , inst , false , false ); err != nil {
567+ return err
568+ }
569+
556570 return nil
557571}
558572
You can’t perform that action at this time.
0 commit comments