mirror of
https://github.com/beego/bee.git
synced 2025-07-06 04:40:19 +00:00
fix: check existence of file go.mod.
This commit is contained in:
@ -29,6 +29,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
|
"github.com/astaxie/beego/utils"
|
||||||
beeLogger "github.com/beego/bee/logger"
|
beeLogger "github.com/beego/bee/logger"
|
||||||
"github.com/beego/bee/logger/colors"
|
"github.com/beego/bee/logger/colors"
|
||||||
)
|
)
|
||||||
@ -457,9 +458,12 @@ func IsModuleEnabled(gopaths []string, cwd string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if utils.FileExists(filepath.Join(cwd, "go.mod")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// InDir checks whether path is in the file tree rooted at dir.
|
// InDir checks whether path is in the file tree rooted at dir.
|
||||||
// If so, InDir returns an equivalent path relative to dir.
|
// If so, InDir returns an equivalent path relative to dir.
|
||||||
|
Reference in New Issue
Block a user