process.env is no longer available from
tailwind.config.js processed by Hugo Pipes: the following:
typeof process.env.HUGO_ENV !== "undefined"
Systematically returns false.
Could it be be because of the new security restrictions? Does
process needs to be “allowed” somehow to one of the settings? Has any body also stumbled upon this?
EDIT: I don’t think this is the problem. I didn’t realize you could use either.
I’m passing the environment variable myself using my CI settings or a goold old
HUGO_ENV=something hugo serve. So the name of the variable is not in question. I know security settings by default only allow
HUGO_ environment variable, but
- This would allow this one
- I’m not sure it even concerns PostCSS as this is set on
You need to do this:
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|HUGO_ENV)$']
osEnv = ['.*$']
Thanks @jmooring! You’re being so helpful like always!
If you use
HUGO_ENVIRONMENT you don’t have to jump through the config hoops.
I think we need to add
HUGO_ENV to the os/exec environment.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.