ref: 377ad87a51e0ef3619af4fe1be6aeee14c215c0a
parent: 292b0e26ec9253398f7289dcf096691f63de2d96
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Mon Sep 14 06:22:24 EDT 2020
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.
--- a/common/hugo/hugo.go
+++ b/common/hugo/hugo.go
@@ -87,7 +87,7 @@
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 {