String replacements with env vars, how to?

11 views
Skip to first unread message

Theodoor van Donge

unread,
Sep 19, 2024, 10:54:04 AMSep 19
to Illuminated Cloud Q&A
Imagine you are using string replacements, docs are here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_string_replace.htm

And you need to export environment variables to the Illuminated Cloud push/pull command. 
Is just running a bash script from the Intellij terminal sufficient to export the variables? 

Or how do others do this?

Scott

unread,
Sep 19, 2024, 10:59:17 AMSep 19
to Illuminated Cloud Q&A, theodoor...@casenine.com
Hi, Theo. When launched from the Mac/Linux dock/Finder/Files, the resulting IDE process doesn't necessarily inherit the full set of environment variables that you set in your command-line. Basically the environment is inherited from the launching process, and the Finder/Files apps in Mac/Linux aren't started using your shell's startup scripts. The JetBrains IDE does some hackery to pick up she shell's $PATH, but that's all.

If you need the full environment, you'll need to start the IDE process using the provided startup script from your shell that already has the needed environment.

Note that this doesn't affect Windows because its system environment variables are inherited by the IDE when launched via Explorer.

Regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages