Skip to content

Commit

Permalink
Fixed logging issue for env source when dotfiles are used.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferahl committed Jan 26, 2024
1 parent 6c73caa commit b17eeb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@
- [x] Fix: Read command must match argument to a single property, no property match
- [x] Fix: write command needs log message when no properties have a writable source
- [x] Fix: Remove support for optional properties, define them in lower layer instead??? should be an error
- [x] Fix: Bad logging (racoon WARN[0000] dotenv file local.env was not found ... racoon DEBU[0000] dotenv file local.env loaded)

- [ ] (in-progress) Initial round of real world testing

- [ ] Fix: Bad logging (racoon WARN[0000] dotenv file local.env was not found ... racoon DEBU[0000] dotenv file local.env loaded)
- [ ] Fix: Should sort apply to the remapped keys? In other words, do we sort after remapping?
- [ ] Feature: Allow prefix for dotenv output (could be used to do "export FOO=bar" or "MYSVC_FOO=bar")
- [ ] Feature: Allow {name} to be replaced with the manifest name (make sure we support this everywhere)
- [ ] Feature: Add output type "combine", that combines aliased outputs
Expand Down
2 changes: 2 additions & 0 deletions internal/store/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ func (s *Environment) Read(ctx config.AppContext, layer api.Layer, key string, s
if err := godotenv.Overload(df); err != nil {
if os.IsNotExist(err) {
ctx.Log.Warnf("dotenv file %s was not found", df)
s.dotfilesLoaded = append(s.dotfilesLoaded, df)
continue
} else {
return api.NewValue(api.NewValueSource(layer, api.SourceTypeEnvironment), "", "", err, sensitive)
}
Expand Down

0 comments on commit b17eeb7

Please sign in to comment.