EnvFile icon indicating copy to clipboard operation
EnvFile copied to clipboard

Environment variable does get resolves in 'VM Options' in 'Configuration'

Open dhruv-bansal opened this issue 5 years ago • 3 comments

Defined variable in file DATASOURCE_CONF=-Dspring.datasource.url=jdbc:mysql://localhost:3306/TEST_DATABASE -Dspring.datasource.username=test -Dspring.datasource.password=test -Dhibernate.dialect=org.hibernate.dialect.MySQLDialect

added file in configuration image

This variable is not getting resolved in VM Options image

dhruv-bansal avatar Jun 07 '19 11:06 dhruv-bansal

Does it work if you set environment variables via native IDE UI in the Configuration tab?

I'm afraid it might be a limitation that we cannot do anything about in the same way as it was in https://github.com/ashald/EnvFile/issues/78#issuecomment-486115324.

If I had to offer an alternative, I'd suggest trying setting those values via JAVA_OPTS environment variable.

ashald avatar Jun 07 '19 15:06 ashald

Yes, it worked very well after declaring into "Environment variables" in the "Configuration tab". I just have to change ${DATASOURCE_CONF} to $DATASOURCE_CONF$ In my point of view, EnvFile should act as a Decorator over the "Environment Variables" functionality. Everything offered by "Environment variables" plus the additional feature of easily managing variable via file etc. @ashald What do you think?

dhruv-bansal avatar Jun 07 '19 18:06 dhruv-bansal

I think that's a great idea but unfortunately that is not something that is possible to implement with current APIs exposed by JetBrains IDEs. 😞

ashald avatar Jun 07 '19 18:06 ashald