Skip to content

Commit 92c5be0

Browse files
committed
fix: added early return in case of flock file being absent
1 parent 2709791 commit 92c5be0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/ai/skills/lock.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ func openFlockFile(path string) (*os.File, error) {
4242
func ReadLock(path string) (*Lock, error) {
4343
fl, err := openFlockFile(path)
4444
if err != nil {
45+
if errors.Is(err, os.ErrNotExist) {
46+
return nil, nil
47+
}
4548
return nil, err
4649
}
4750
defer func() {

0 commit comments

Comments
 (0)