From 377ad87a51e0ef3619af4fe1be6aeee14c215c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 14 Sep 2020 10:22:24 +0200 Subject: [PATCH] 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. --- common/hugo/hugo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/hugo/hugo.go b/common/hugo/hugo.go index ac75e6bca..f455674e4 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 {