File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -134,11 +134,11 @@ func listAction(cmd *cobra.Command, args []string) error {
134134 logrus .Warnf ("The directory %q does not look like a valid Lima directory: %v" , store .Directory (), err )
135135 }
136136
137- allinstances , err := store .Instances ()
137+ allInstances , err := store .Instances ()
138138 if err != nil {
139139 return err
140140 }
141- if len (allinstances ) == 0 {
141+ if len (args ) == 0 && len ( allInstances ) == 0 {
142142 logrus .Warn ("No instance found. Run `limactl create` to create an instance." )
143143 return nil
144144 }
@@ -147,7 +147,7 @@ func listAction(cmd *cobra.Command, args []string) error {
147147 unmatchedInstances := false
148148 if len (args ) > 0 {
149149 for _ , arg := range args {
150- matches := instanceMatches (arg , allinstances )
150+ matches := instanceMatches (arg , allInstances )
151151 if len (matches ) > 0 {
152152 instanceNames = append (instanceNames , matches ... )
153153 } else {
@@ -156,7 +156,7 @@ func listAction(cmd *cobra.Command, args []string) error {
156156 }
157157 }
158158 } else {
159- instanceNames = allinstances
159+ instanceNames = allInstances
160160 }
161161
162162 if quiet {
You can’t perform that action at this time.
0 commit comments