Terminal Environment Variables can't reference other Environment Variables

Through Settings --> Terminal --> Environment Variables I can't create environment variables which reference other environment variables.  For example:
Foo=SomeValue
Foo2=%Foo%

Then echoing Foo2 on the command line results in the following:

>echo %Foo2%
%Foo%

I'm using cmd.exe as my shell. It works if I set the environment variables from the command line.  But I don't want to do that every time I launch the IDE.

The specific problem I'm trying to solve is to add a directory to my PATH environment variable (ex: "PATH=%PATH%;<additional path here>") when I'm inside of WebStorm, and then export this setting so it can be shared with other developers on my team.  

I'm also open to alternatives if there's a better way to achieve this.  Any suggestions appreciated. :-)

0
4 comments

It's not possible, please file a request for this feature to youtrack, https://youtrack.jetbrains.com/issues/IDEA

0
Avatar
Permanently deleted user
0
Avatar
Permanently deleted user

Hello, I'm having the same issue with pycharm on linux? What would be the equivalent there?

PYTHONPATH=${VENV_HOME}/lib/python;

VENV_HOME=${VIRTUAL_ENV};

VENV_BIN=${VENV_HOME}/bin;

Is this correct?Am i missing something? (I've already tried the %% notation)

0

What issue? Is it about referencing other environment variables in Settings --> Terminal --> Environment Variables? It's not supported, see above.

If your issue is different, please start a new thread at https://intellij-support.jetbrains.com/hc/en-us/community/topics/200379535-PyCharm

0

Please sign in to leave a comment.