You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Huh, interesting, I wonder how 6 years down the line you're the first to hit this.
Maybe part of initial security models block certain globals, I thought that was all removed though when running locally - you're welcome to take a look 👍🏻
For what it's worth, I am able to access the process.env.MY_ENV_VARIABLE successfully. I'm running this on Danger 12.3.3 via a GitHub Action. However, TypeScript is unhappy about the undeclared process global, which I would normally fix by adding @types/node as a dev dependency. That wouldn't work for me (because I'm executing this on a GitHub Action) so I added a @ts-expect-error comment:
// @ts-expect-error Danger can't reference @types/node for the `process` type in a GitHub Action, so we ignore this error instead.constmyEnvVariable=process.env.MY_ENV_VARIABLE
Describe the bug
Using
process.env.whatever
in a danger file leads to a runtime error stating thatprocess
is undefined.To Reproduce
process.env
Expected behavior
You should be able to access
process.env
Screenshots
Your Environment
node:16
docker imageAdditional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: