@@ -189,7 +189,7 @@ func loadOrCreateInstance(cmd *cobra.Command, args []string, createOnly bool) (*
189189 return nil , errors .New ("must pass instance name with --name when reading template from stdin" )
190190 }
191191 st .yBytes , err = io .ReadAll (os .Stdin )
192- if err != nil && err != io . EOF {
192+ if err != nil {
193193 return nil , fmt .Errorf ("unexpected error reading stdin: %w" , err )
194194 }
195195 // see if the tty was set explicitly or not
@@ -322,7 +322,7 @@ func createInstance(ctx context.Context, st *creatorState, saveBrokenEditorBuffe
322322 }
323323 rejectedYAML := "lima.REJECTED.yaml"
324324 if writeErr := os .WriteFile (rejectedYAML , st .yBytes , 0o644 ); writeErr != nil {
325- return nil , fmt .Errorf ("the YAML is invalid, attempted to save the buffer as %q but failed: %v : %w" , rejectedYAML , writeErr , err )
325+ return nil , fmt .Errorf ("the YAML is invalid, attempted to save the buffer as %q but failed: %w : %w" , rejectedYAML , writeErr , err )
326326 }
327327 return nil , fmt .Errorf ("the YAML is invalid, saved the buffer as %q: %w" , rejectedYAML , err )
328328 }
@@ -374,7 +374,7 @@ func chooseNextCreatorState(st *creatorState, yq string) (*creatorState, error)
374374 }
375375 ans , err := uiutil .Select (message , options )
376376 if err != nil {
377- if err == uiutil .InterruptErr {
377+ if errors . Is ( err , uiutil .InterruptErr ) {
378378 logrus .Fatal ("Interrupted by user" )
379379 }
380380 logrus .WithError (err ).Warn ("Failed to open TUI" )
0 commit comments