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

System wide env variables not used in substitute #81

Closed
antoine-morisseau opened this issue Apr 3, 2019 · 4 comments
Closed

System wide env variables not used in substitute #81

antoine-morisseau opened this issue Apr 3, 2019 · 4 comments

Comments

@antoine-morisseau
Copy link

antoine-morisseau commented Apr 3, 2019

I'm using Intellij Idea IntelliJ IDEA 2019.1 (Community Edition)
Build #IC-191.6183.87, built on March 27, 2019
JRE: 1.8.0_202-release-1483-b39 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4

The envFile plugin is the v3.1.0.

I tried to retrieve some system env variable like ${USER} in the substitute env variable.
So i'm trying to do something like that.
ENV_NAME=local_${USER}

And in my application i only get ENV_NAME=local_
I have checked the <Run Configuration Env Vars> and placed it on top but it's still not working.
It seems the EnvFile plugin is not including the selected option
image

@ashald
Copy link
Owner

ashald commented Apr 12, 2019

What about the application when it runs? Does it see the USER environment variable?

@antoine-morisseau
Copy link
Author

yes, that's the weirdest part.
in intellij in the run configuration the "Include system environment variables" is selected by default.
and when debugging the application i tried to see the USER env variable and it worked.
But when using the plugin for substitute it didn't work.

It seems the plugin only substitute variable with defined env variable in other env file selected not system wide env variables

@ashald ashald closed this as completed in 6cf3cb0 Apr 25, 2019
@ashald
Copy link
Owner

ashald commented Apr 25, 2019

Took me a while to figure it out as it was working in PyCharm but then I realized IDEA is a little bit different from all other JetBrains IDEs. ¯_(ツ)_/¯

Fixed in v3.1.1, I'm submitting an update to JetBrains and meantime you can install latest version from an archive directly https://github.com/ashald/EnvFile/releases/tag/v3.1.1

@pswaminathan
Copy link

pswaminathan commented Nov 22, 2019

This same issue appears to be happening in GoLand—I'm encountering with the ${USER} variable as well. Plugin version v3.2.0.

GoLand 2019.2.5
Build #GO-192.7142.48, built on November 7, 2019
Runtime version: 11.0.4+10-b304.77 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants