-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed `Provider.save()` to properly ignore stores which do not provide a saveSync method. Also, fixed `save()` to properly save asynchronously when an async `save()` method on a store is provided. Removed the tests from `nconf-test.js` which expected `save()` to throw or return an error when a store without `save()` methods was encountered. Also removed a `console.log` from `provider-test.js`.
- Loading branch information
Russell Frank
committed
May 2, 2012
1 parent
29eb5f9
commit 36e061c
Showing
4 changed files
with
35 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36e061c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@russfrank This introduced a very serious regression that thankfully was caught before too many upstream versions were affected.
The regression is illustrated in 7e8d9d6 and fixed in d96d254.
When saving stores asynchronously in
saveStore()
you immediately invoked thenext
callback instead of waiting for thestore.save()
to return (if it exists). This causes node.js to exit before the save operation actually completes causing blank files.36e061c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops! sorry about that, glad it was fixed
36e061c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me too .... thanks for the contribution, I liked you changes; except the bug of course :-D