How to escape dollar signs in program arguments

Answered

In Run configurations... 

If I have a program argument that contains a string with $anything$ I cannot figure out how to force Intellij to interpret that as a literal $anything$, and not have Intellij also complain about an undefined path variable. I've tried \$anything\$ and that doesn't work. It's interpreted as a literal \$anything\$. 

Error message:

Load error: undefined path variables
anything is undefined. Fix it
Path variables are used to substitute absolute paths in IDEA project files and allow project file sharing in version control systems.
Some of the files describing the current project settings contain unknown path variables and IDEA cannot restore those paths.

Any ideas?

 

1
4 comments

Reported the issue, please follow for updates: https://youtrack.jetbrains.com/issue/IDEA-172457.

0

Can you create a path variable named 'anything' and set the value to '$anything$'?

0

You may need to use a different variable name, or it will cause the infinite loop: https://youtrack.jetbrains.com/issue/IDEA-172458.

0

Right you are. And there's currently no way around it because one will always need to have a literal $value$ in one's command line and the interpreter seems to be very very greedy. Even when I split up the value between two variables, it will always continue to iteratively evaluate the statements until all $whatever$ instances are evaluated and replaced.

I hit that infinite loop too. Had to go digging in my xml files to get Intellij to start up again...

Thanks for picking this issue up!

 

0

Please sign in to leave a comment.