question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Flag to set environment variables on cli

See original GitHub issue

I’ve looked for if this exists and not found anything.

Requested API Example

nodemon --env MY_VAR=asdf --exec something

I know there are other ways to achieve this, but I think this deserves a first class cli argument.

Is this something that would be accepted if a PR were made?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
caesaycommented, Feb 4, 2021

The proposition usually used (ex MY_VAR=asdf nodemon ...) does not work on windows, however usually cross-env is used in this case:

cross-env MY_VAR=asdf nodemon --exec something
1reaction
remycommented, Feb 5, 2021

@caesay this is a good candidate for the FAQ - I’m definitely a fan of leveraging existing tools that make the work easier 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

feature request: add a flag that tells bazel to include ... - GitHub
I understand the concept of wanting to have a sandboxed environment for builds on many software in order to maintain reproducibility, ...
Read more >
Angular Feature Flags: Feature toggle applications by using ...
Feature Flags in angular can be extremely powerful to toggle features ... pass in environment variables through the command line to toggle ...
Read more >
How to prevent Netlify CLI from injecting .env? - Support
Is there any way to configure netlify.toml or a CLI flag that can disable the automatic injection of the .env variables into the...
Read more >
Environment variables to configure the AWS CLI
Environment variables provide another way to specify configuration options and credentials, and can be useful for scripting or temporarily setting a named ...
Read more >
How to Use Feature Flags | by Ben Brazier | 05 July 2022 - Torvo
This is a quick and easy way to change settings but we should avoid using them to configure feature flags. Environment Variables.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found