Skip to content

Commit

Permalink
.example_backend_env fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Feb 17, 2024
1 parent baf2d2b commit 50484ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func GetConfiguration(path string) (*Settings, error) {
v.AddConfigPath(path)

if environment == EnvironmentLocal {
return readLocal(v)
return readLocal(v, path)
} else {
return readProd(v)
}
Expand Down
6 changes: 3 additions & 3 deletions backend/src/config/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/viper"
)

func readLocal(v *viper.Viper) (*Settings, error) {
func readLocal(v *viper.Viper, path string) (*Settings, error) {
var intermediateSettings intermediateSettings

env := string(EnvironmentLocal)
Expand All @@ -27,9 +27,9 @@ func readLocal(v *viper.Viper) (*Settings, error) {
return nil, fmt.Errorf("failed to convert intermediate settings into final settings: %w", err)
}

err = godotenv.Load(".example_env")
err = godotenv.Load(fmt.Sprintf("%s/.example_backend_env", path))
if err != nil {
return nil, fmt.Errorf("failed to load .example_env: %w", err)
return nil, fmt.Errorf("failed to load %s/.example_backend_env: %w", path, err)
}

pineconeSettings, err := readPineconeSettings()
Expand Down
File renamed without changes.

0 comments on commit 50484ea

Please sign in to comment.