1

Consider an app which, in 12-factor style, receives its config in the form of a JSON document provided as an environment variable. The config contains secrets, so it is never stored on disk; instead, it is computed on the fly before starting the app, using something like sops or nunjucks.

I am trying to debug such an app in IntelliJ. Is there any way to run some arbitrary script before launch and provide its output to the app as an environment variable?

I will accept answers for any run config type, but an approach that works with "npm" or "Application" would be most helpful for me.

Carl Patenaude Poulin
  • 6,238
  • 5
  • 24
  • 46

1 Answers1

1

EnvFile IntelliJ IDEA plug-in added this option some time ago.

I did a quick test and don't see this option available, at least on Windows.

EDIT: found it was only merged in the forked version and not available in the official plug-in. You will have to merge it manually and build the plug-in from sources.

IntelliJ IDEA doesn't have a built-in feature for that, feel free to vote for the corresponding request.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904