indexzero / nconf

Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.
https://github.com/indexzero/nconf
MIT License
3.87k stars 255 forks source link

seems to be an issue with inputSeparator not working #427

Open edmandell opened 1 week ago

edmandell commented 1 week ago

couldn't get inputSeparator working i.e.

import path from 'node:path'; import nconf from 'nconf';

// config process.env['PATHS__LOGDIR'] = 'test';

nconf.argv({parseValues: true}) .env({lowerCase: true, // inputSeparator : '', doesnt work separator : '', // works ok parseValues: true}); // .file({ file: 'config/server.json' });

const logFile = path.join(nconf.get('paths:logdir'), 'server.log'); console.log('directory ', nconf.get('paths:logdir')); console.log('logFile ', logFile); console.log('should be ', process.env.PATHS__LOGDIR);