Skip to content

Commit

Permalink
fix(engine): adapt datasource handling
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen committed Dec 24, 2023
1 parent e97ad54 commit 81fd448
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions engine/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"log"
"os"
"os/exec"
"path"
Expand Down Expand Up @@ -202,18 +201,7 @@ func (e *QueryEngine) GetEncodedDatasources() (string, error) {
}

for i := range datasources {
if env := datasources[i].URL.FromEnvVar; env != "" {
url := os.Getenv(env)
if url == "" {
log.Printf("WARNING: env var %s which was defined in the Prisma schema is not set", env)
continue
// return "", fmt.Errorf("env var %s which was defined in the Prisma schema is not set", env)
}
overrides = append(overrides, DatasourceOverride{
Name: datasources[i].Name.String(),
URL: url,
})
} else {
if val := datasources[i].URL.Value; val == "" {
overrides = append(overrides, DatasourceOverride{
Name: datasources[i].Name.String(),
URL: e.datasourceURL,
Expand Down

0 comments on commit 81fd448

Please sign in to comment.