Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] process.env - Cannot read properties of undefined (reading 'env') #1399

Open
RareSecond opened this issue Aug 17, 2023 · 1 comment
Open
Labels
bug help wanted You Can Do This This idea is well spec'd and ready for a PR

Comments

@RareSecond
Copy link

Describe the bug
Using process.env.whatever in a danger file leads to a runtime error stating that process is undefined.

To Reproduce

  1. Create a dangerfile
  2. Add a reference to process.env
  3. See the error

Expected behavior
You should be able to access process.env

Screenshots
CleanShot 2023-08-17 at 08 08 11

Your Environment

software version
danger.js 11.2.0
node node:16 docker image
npm 7.11.0 (pnpm)
Operating System Gitlab CI

Additional context
Add any other context about the problem here.

@RareSecond RareSecond added the bug label Aug 17, 2023
@orta
Copy link
Member

orta commented Aug 17, 2023

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 👍🏻

@orta orta added help wanted You Can Do This This idea is well spec'd and ready for a PR labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted You Can Do This This idea is well spec'd and ready for a PR
Projects
None yet
Development

No branches or pull requests

2 participants