Updating environment variables set in bash/zshrc profile
已回答
I have a token for accessing a maven repo that is stored in an environment variable set via my .zshrc file. Every 12 hours that token expires. I can automate updating the environment variable, but unless I restart intelliJ, I can't get it to pick up the new value. Is there any way to tell intelliJ that the underlying value has updated?
请先登录再写评论。
Most processes cannot update environment variable changes on the fly. IntelliJ IDEA is not an exception here.
Here is the related feature request: https://youtrack.jetbrains.com/issue/IDEA-178235.
If you are using Maven, why use an environment variable and not a Maven property to reference the token in the build? Can you write a Maven plugin to retrieve the current value of the token and inject it into the build?