From: Bjørn Erik Pedersen Date: Mon, 14 Sep 2020 08:22:24 +0000 (+0200) Subject: Set PWD in environment when running the Node apps X-Git-Tag: v0.75.0~4 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=377ad87a51e0ef3619af4fe1be6aeee14c215c0a;p=brevno-suite%2Fhugo Set PWD in environment when running the Node apps E.g. PostCSS and Babel. This is in line with what we do when running Go. --- diff --git a/common/hugo/hugo.go b/common/hugo/hugo.go index ac75e6bc..f455674e 100644 --- a/common/hugo/hugo.go +++ b/common/hugo/hugo.go @@ -87,7 +87,7 @@ func GetExecEnviron(workDir string, cfg config.Provider, fs afero.Fs) []string { nodepath = workDir + string(os.PathListSeparator) + np } config.SetEnvVars(&env, "NODE_PATH", nodepath) - config.SetEnvVars(&env, "HUGO_WORKDIR", workDir) + config.SetEnvVars(&env, "PWD", workDir) config.SetEnvVars(&env, "HUGO_ENVIRONMENT", cfg.GetString("environment")) fis, err := afero.ReadDir(fs, files.FolderJSConfig) if err == nil {