Skip to content

Commit

Permalink
app: fix dotenv file loading
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Graboski Veiga <[email protected]>
  • Loading branch information
leograba committed Apr 10, 2024
1 parent 2957763 commit 873ed9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sugar.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func loadDotenv() {
err := godotenv.Load()

// If dotenv file is not found in directory, use embedded content
if len(os.Getenv("OPENAI_API_KEY")) == 0 {
if err != nil {
lines := strings.Split(embeddedEnvContent, "\n")
for _, line := range lines {
parts := strings.SplitN(line, "=", 2)
Expand Down

0 comments on commit 873ed9c

Please sign in to comment.