File tree 1 file changed +4
-4
lines changed
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 {
134
134
logrus .Warnf ("The directory %q does not look like a valid Lima directory: %v" , store .Directory (), err )
135
135
}
136
136
137
- allinstances , err := store .Instances ()
137
+ allInstances , err := store .Instances ()
138
138
if err != nil {
139
139
return err
140
140
}
141
- if len (allinstances ) == 0 {
141
+ if len (args ) == 0 && len ( allInstances ) == 0 {
142
142
logrus .Warn ("No instance found. Run `limactl create` to create an instance." )
143
143
return nil
144
144
}
@@ -147,7 +147,7 @@ func listAction(cmd *cobra.Command, args []string) error {
147
147
unmatchedInstances := false
148
148
if len (args ) > 0 {
149
149
for _ , arg := range args {
150
- matches := instanceMatches (arg , allinstances )
150
+ matches := instanceMatches (arg , allInstances )
151
151
if len (matches ) > 0 {
152
152
instanceNames = append (instanceNames , matches ... )
153
153
} else {
@@ -156,7 +156,7 @@ func listAction(cmd *cobra.Command, args []string) error {
156
156
}
157
157
}
158
158
} else {
159
- instanceNames = allinstances
159
+ instanceNames = allInstances
160
160
}
161
161
162
162
if quiet {
You can’t perform that action at this time.
0 commit comments