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 {
|
for {
|
||||||
goModPath := filepath.Join(currentDir, "go.mod")
|
dotEnvPath := filepath.Join(currentDir, ".env")
|
||||||
if _, err := os.Stat(goModPath); err == nil {
|
if _, err := os.Stat(dotEnvPath); err == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
parent := filepath.Dir(currentDir)
|
parent := filepath.Dir(currentDir)
|
||||||
if parent == currentDir {
|
if parent == currentDir {
|
||||||
panic(fmt.Errorf("go.mod not found"))
|
panic(fmt.Errorf(".env not found"))
|
||||||
}
|
}
|
||||||
currentDir = parent
|
currentDir = parent
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue