Don't use the OS environment when creating config for docs

This commit is contained in:
Bjørn Erik Pedersen 2023-08-30 19:14:04 +02:00
parent 94fbab2a88
commit 45c9bbc6ca
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -25,7 +25,7 @@ import (
// DefaultConfig returns the default configuration.
func DefaultConfig() *allconfig.Config {
fs := afero.NewMemMapFs()
all, err := allconfig.LoadConfig(allconfig.ConfigSourceDescriptor{Fs: fs})
all, err := allconfig.LoadConfig(allconfig.ConfigSourceDescriptor{Fs: fs, Environ: []string{"none"}})
if err != nil {
panic(err)
}
@ -176,7 +176,7 @@ module github.com/bep/mymod
return nil, err
}
conf, err := allconfig.LoadConfig(allconfig.ConfigSourceDescriptor{Fs: fs, Flags: cfg})
conf, err := allconfig.LoadConfig(allconfig.ConfigSourceDescriptor{Fs: fs, Flags: cfg, Environ: []string{"none"}})
if err != nil {
return nil, err
}