fix env
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
e9d6e20b6f
commit
8d03950cd5
|
@ -48,14 +48,14 @@ func dir(envFile string) string {
|
|||
}
|
||||
|
||||
for {
|
||||
goModPath := filepath.Join(currentDir, "go.mod")
|
||||
if _, err := os.Stat(goModPath); err == nil {
|
||||
dotEnvPath := filepath.Join(currentDir, ".env")
|
||||
if _, err := os.Stat(dotEnvPath); err == nil {
|
||||
break
|
||||
}
|
||||
|
||||
parent := filepath.Dir(currentDir)
|
||||
if parent == currentDir {
|
||||
panic(fmt.Errorf("go.mod not found"))
|
||||
panic(fmt.Errorf(".env not found"))
|
||||
}
|
||||
currentDir = parent
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue