Skip to content

Commit bae6642

Browse files
fix: skip if already present
1 parent ba4e6ca commit bae6642

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pythonvenv.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
"github.com/CREDOProject/go-pythonvenv/finder"
99
"github.com/CREDOProject/go-pythonvenv/utils"
10+
"github.com/CREDOProject/sharedutils/files"
1011
)
1112

1213
var (
@@ -31,9 +32,9 @@ func Create(path string) (*PythonVenv, error) {
3132
}
3233

3334
func createVenv(path string) error {
34-
// if files.IsDir(path) {
35-
// return ErrAlreadyPresent
36-
// }
35+
if files.IsDir(path) {
36+
return ErrAlreadyPresent
37+
}
3738
v, err := finder.New().Find()
3839
if err != nil {
3940
return err

0 commit comments

Comments
 (0)