0

I am working on setting up the JetBrains Fleet for JavaScript development.

Here is my hard coded run.json look like.

"configurations": [
    {
        "type": "command",
        "name": "local test",
        "program": "npm",
        "args": [
            "run",
            "test",
            "ssoni_local"
        ],
    }
]

Instead of using ssoni (my username), I would like to use ${USERNAME} environment variable so the same run.json file can be used my other team members as well.

How can I achieve the same?

Also same needs for the hostname variable as well. Instead of hardcoding machine name want to use an environment variable.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Soni Snehal
  • 47
  • 1
  • 1
  • 7
  • These are built-in macros: https://www.jetbrains.com/help/fleet/built-in-macros.html Not sure if you can **refer* to existing ENV variable here though... (but you can *specify your own* ENV variables) – LazyOne Nov 30 '22 at 11:53
  • An idea though (rather inconvenient though): what if you target a custom shell/batch script where you can get all this info from ENV and make the actual execution of the needed program/command? – LazyOne Nov 30 '22 at 11:55

1 Answers1

0

Fleet supports several macros variables in run configuration json file, but the ${USERNAME} is not supported. I have filled a request for this: FL-19179 Run Configurations: support user name macros variable

Please feel free to vote for in in Fleet issue tracker.

Andrey
  • 15,144
  • 25
  • 91
  • 187