ts-command-line-args icon indicating copy to clipboard operation
ts-command-line-args copied to clipboard

feat: add option to lookup from env variable

Open darkgnotic opened this issue 1 year ago • 2 comments

As requested and specified in #30

An Option's value, in order of increasing precedence, is taken from:

  • the Option's defaultValue
  • the value from a config file
  • the value from the Option's env variable 🆕
  • the value from the command line

Values from process.env are parsed as if they were specified on the command line.

darkgnotic avatar Oct 31 '24 15:10 darkgnotic

@Roaders I took a stab at #30. Thanks for maintaining this cool library!

darkgnotic avatar Oct 31 '24 15:10 darkgnotic

Thanks for the PR. I will try to get round to taking a proper look at it soon.

Roaders avatar Oct 31 '24 22:10 Roaders