source: node_modules/dotenv/lib/cli-options.js

main
Last change on this file was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 385 bytes
Line 
1const re = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/
2
3module.exports = function optionMatcher (args) {
4 const options = args.reduce(function (acc, cur) {
5 const matches = cur.match(re)
6 if (matches) {
7 acc[matches[1]] = matches[2]
8 }
9 return acc
10 }, {})
11
12 if (!('quiet' in options)) {
13 options.quiet = 'true'
14 }
15
16 return options
17}
Note: See TracBrowser for help on using the repository browser.