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

The value of process.env.foo can sometimes be observed to be undefined after being assigned the value of '' #19048

Closed
zenflow opened this issue Feb 27, 2018 · 4 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. windows Issues and PRs related to the Windows platform.

Comments

@zenflow
Copy link
Contributor

zenflow commented Feb 27, 2018

The value of process.env.foo can sometimes be observed to be undefined after being assigned the value of ''

Please see zenflow/node-bug-windows-process-dot-env for a full reproduction, with execution set up on Travis CI and AppVeyor CI.

Subsystem: unknown
Local Version: v8.9.4
Local Platform: ver says version 10.0.16299.248, 64-bit
AppVeyor Versions: v6, v8, v9
AppVeyor Platform: ver says version 10.0.16299.248, 64-bit

Full issue description (copied from the reproduction repo)

After being assigned the value of '', the value of process.env.foo can sometimes be observed to be undefined.

This seems to only happen in Windows environments.

It also happens rather unpredictibly (yet consistently). There are two tests in the tests dir: symptom.js and no-symptom.js. symptom.js will show the symptom on Windows and no-symptom.js will not. But look how similar the two tests are, and how the difference would not be expected to change the outcome.

@addaleax addaleax added duplicate Issues and PRs that are duplicates of other issues or PRs. windows Issues and PRs related to the Windows platform. labels Feb 27, 2018
@addaleax
Copy link
Member

See #14593, I’m pretty certain this is a duplicate of that. The fix (#18463) will be included the next v8.x release (#18336, you can try the RC that’s linked there) and has been released in v9.6.0.

Thanks for all the work you’ve put into this reproduction, though! It’s really appreciated.

I’m closing this as a duplicate, but feel free to ask if this should be re-opened or you have any questions about it.

@zenflow
Copy link
Contributor Author

zenflow commented Feb 27, 2018

Sorry, did not realize this issue was already filed.

Hopefully my reproduction library is of use.

Latest AppVeyor build is pending but you can see earlier builds (which are failing just because it's not compatible with v4).

@addaleax
Copy link
Member

@zenflow I don’t think there’s anything you’d need to do here, except wait for the next v8.x release. :)

@zenflow
Copy link
Contributor Author

zenflow commented Feb 27, 2018

@addaleax Ah, yeah, I suppose once AppVeyor supports node v9.6 my tests can pass.

Thanks for addressing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

2 participants