Closed Jason3S closed 6 years ago
I had some user complaining about files being written when they hadn't made any changes.
How would they even notice? It's not written in a location users usually look at. And why is it a problem? You're going to write to that directory at some point regardless. I'm just trying to understand your use-case.
Our use case is a bit different. If the global setting exists, then read it and merge it with the local settings. Related Issue is about how the file was written when it wasn't ask for.
I can do a pull request if this helps.
The idea is to add a "lazy" option and only create on write.
Not really interested in an option for this obscure use-case, but I guess we could remove https://github.com/yeoman/configstore/blob/35d46bb6a37a17d5ff69896b13ea7c322728e54f/index.js#L33 as it seems moot since we already create the directory on write.
Excellent!! That works perfectly!
@Jason3S, PR welcome :).
I noticed that configstore creates the directory and file on read.
Would you be interested in adding an option that allowed for file creation at write time if it doesn't exist?
I had some user complaining about files being written when they hadn't made any changes.