From 45c9bbc6ca9b43f33dbf290cb09badb818379d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 30 Aug 2023 19:14:04 +0200 Subject: [PATCH] Don't use the OS environment when creating config for docs --- hugolib/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hugolib/config.go b/hugolib/config.go index af3f0647f..70dd790fe 100644 --- a/hugolib/config.go +++ b/hugolib/config.go @@ -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 }