globalPassThroughEnv
and passThroughEnv
don't get merged
#9659
Labels
kind: bug
Something isn't working
globalPassThroughEnv
and passThroughEnv
don't get merged
#9659
(Using my Maintainer's Privilege™️ here to ignore the bug report template) 😄
@juliusmarminge found us a bug and I'm filing on his behalf. In the following two logs, you can see a difference in the printed output of
NODE_ENV
:Notably, the cache hit comes from a run that happened on Vercel, where
NODE_ENV
is set. This isn't the case in a GitHub Action by default.The expectation is that this
globalPassThroughEnv
can be overridden by apassThroughEnv
in a Package Configuration.Here's my reproduction repository. Summary of changes (starting with
create-turbo
) and how I'm reproducing locally:NODE_ENV
intoglobalPassThroughEnv
../packages/ui/run-this.js
file with contents ofconsole.log(process.env.NODE_ENV)
."build": "node run-this.js"
to./packages/ui/package.json
.export NODE_ENV=foo
onto your shell.turbo build
.You'll get what I believe to be unexpected behavior:
NODE_ENV
printingfoo
fromrun-this.js
.I've tested some of my assumptions by messing with combinations of removing the
globalPassThroughEnv
, removing the Package Configuration'spassThroughEnv
, and placing aconsole.log(process.env.NODE_ENV)
into the applications.I'm thinking the bug here is that we don't merge
globalPassThroughEnv
withpassThroughEnv
. I can't find a codepath where this would happen (though I may be simply not be seeing it and there's something else at play that I haven't considered.)The text was updated successfully, but these errors were encountered: