We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fe7598 commit f3bd1bcCopy full SHA for f3bd1bc
internal/config/env.go
@@ -13,5 +13,12 @@ func (c *Config) addEnvVars() error {
13
}
14
c.Cloud.AuthToken = authToken
15
16
+ serverUri := os.Getenv("SQLC_SERVER_URI")
17
+ if serverUri != "" && len(c.Servers) != 1 {
18
+ return fmt.Errorf("$SQLC_SERVER_URI may only be used when there is exactly one server in config file")
19
+ } else if serverUri != "" {
20
+ c.Servers[0].URI = serverUri
21
+ }
22
+
23
return nil
24
0 commit comments