Is there a way to use en…

less than 1 minute read

Is there a way to use environment variables in workspace.json or should I create a package.json script for that?

Responses:

Example scenario: providing tokens for cli tools using the run-command builder

What does your command look like normally?

: "@nrwl/workspace:run-commands", "options": { "commands": [ { "command": "vercel --token=${VERCEL_TOKEN}" } ], "cwd": "./" }

basically a scenario like this

Ok sorry this actually works, just without the curly brackets, not sure why I added them. so the correct usage would be "command": "vercel --token=$VERCEL_TOKEN"

Updated: