From 8d03950cd57d4f073a5ce4094ce047191ea6aee7 Mon Sep 17 00:00:00 2001 From: user-penguin Date: Tue, 12 Nov 2024 03:21:44 +0700 Subject: [PATCH] fix env --- cmd/smm_tg/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/smm_tg/main.go b/cmd/smm_tg/main.go index 76ae44a..349d05e 100644 --- a/cmd/smm_tg/main.go +++ b/cmd/smm_tg/main.go @@ -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 }