Skip to content

Commit 78d0401

Browse files
committed
limactl ls: suppress ENOENT
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 17fa616 commit 78d0401

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/store/store.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package store
22

33
import (
4+
"errors"
45
"os"
56
"path/filepath"
67
"strings"
@@ -18,6 +19,9 @@ func Instances() ([]string, error) {
1819
}
1920
limaDirList, err := os.ReadDir(limaDir)
2021
if err != nil {
22+
if errors.Is(err, os.ErrNotExist) {
23+
return nil, nil
24+
}
2125
return nil, err
2226
}
2327
var names []string

0 commit comments

Comments
 (0)