internal/config: don't read local override file
Fixes this error:
readOverrideFile(ctx, "local-override.yaml"): dialing: google: could not
find default credentials. See
for more information.
Trust: Julie Qiu
@@ -474,6 +474,7 @@ func Init(ctx context.Context) (_ *Config, err error) {
// should provide overrides for selected configuration.
// Use this when you want to fix something in prod quickly, without waiting
// to re-deploy. (Otherwise, do not use it.)
+ if cfg.DeploymentEnvironment() != "local" {
overrideObj := fmt.Sprintf("%s-override.yaml", cfg.DeploymentEnvironment())
overrideBytes, err := readOverrideFile(ctx, bucket, overrideObj)
if err != nil {
@@ -482,6 +483,7 @@ func Init(ctx context.Context) (_ *Config, err error) {
log.Printf("processing overrides from gs://%s/%s", bucket, overrideObj)
processOverrides(cfg, overrideBytes)
}
+ }
return cfg, nil
}
