Skip to content

Commit e097c96

Browse files
committed
fix: project path check logic mistake
1 parent fca1b95 commit e097c96

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/pkg/project/addr.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ func CompleteAddrToProject(addr string) (*Project, error) {
7777
p.Path = path.Join(p.Dir, p.Repo, p.SubDir)
7878
pState, err := os.Stat(p.Path)
7979
if err != nil {
80-
return nil, err
81-
}
82-
if !pState.IsDir() {
80+
if !os.IsNotExist(err) {
81+
return nil, err
82+
}
83+
} else if !pState.IsDir() {
8384
return nil, util.ErrProjectMustDir
8485
}
8586
return &p, nil

0 commit comments

Comments
 (0)