Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: An option to ignore missing config files #27

Closed
Munawwar opened this issue Jan 7, 2017 · 4 comments
Closed

Feature request: An option to ignore missing config files #27

Munawwar opened this issue Jan 7, 2017 · 4 comments

Comments

@Munawwar
Copy link
Contributor

Munawwar commented Jan 7, 2017

In a project, I've got to merge multiple config files together. If one of the environment specific files doesn't exist then it would need to merge whatever files that exists (among the list of specified files).
Example:

cjson.load([
  'project1-env1.cjson',
  'project1-default.cjson',
  'env1.cjson',
  'default.cjson'
], true);

So if env1.cjson doesn't exist then merge the rest.

But implementing this as the default behavior could conceal missing config files (that wasn't intended to be missing). So..to not break backwards compatibility, how about an option like ignoreMissingFiles: true?

If you are ok with the feature request, I could give a shot at implementing it.

@Munawwar Munawwar changed the title Feature request: An option to ignore non-existant files Feature request: An option to ignore non-existent files Jan 7, 2017
@Munawwar Munawwar changed the title Feature request: An option to ignore non-existent files Feature request: An option to ignore missing config files Jan 7, 2017
@kof
Copy link
Owner

kof commented Jan 7, 2017

I think its ok to ignore missing files by default.

@kof
Copy link
Owner

kof commented Jan 7, 2017

And yes, send me a pr with a test and I will merge.

@Munawwar
Copy link
Contributor Author

Munawwar commented Jan 7, 2017

Pr #28 (forgot to write that in the commit message)

@kof
Copy link
Owner

kof commented Jan 7, 2017

published

@kof kof closed this as completed Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants