fix env
continuous-integration/drone/push Build is passing Details

This commit is contained in:
user-penguin 2024-11-12 03:21:44 +07:00
parent e9d6e20b6f
commit 8d03950cd5
1 changed files with 3 additions and 3 deletions

View File

@ -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
} }