From 236e6ffa3f168578f9fe1b5b89029fc36ac7b6f3 Mon Sep 17 00:00:00 2001 From: Michael Garvin Date: Mon, 2 Apr 2018 15:13:09 -0700 Subject: [PATCH 1/2] fix: init event The init event was only being emitted during initialization of a new repo. If one already existed that event was not firing. This syncs up the behavior between these two situations so that they log, set self.state, and emit identically. --- src/core/boot.js | 1 + src/core/components/init.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/core/boot.js b/src/core/boot.js index cc7c14970e..a9a81e34d5 100644 --- a/src/core/boot.js +++ b/src/core/boot.js @@ -32,6 +32,7 @@ module.exports = (self) => { (cb) => { self.log('initialized') self.state.initialized() + self.emit('init'); cb(null, true) } ], (err, res) => { diff --git a/src/core/components/init.js b/src/core/components/init.js index 21504c9128..5da2ff06cc 100644 --- a/src/core/components/init.js +++ b/src/core/components/init.js @@ -22,6 +22,7 @@ module.exports = function init (self) { return callback(err) } + self.log('initialized') self.state.initialized() self.emit('init') callback(null, res) From 697b4f08beef101bdd09a89cb5a284e5751aeeba Mon Sep 17 00:00:00 2001 From: Michael Garvin Date: Tue, 3 Apr 2018 08:02:52 -0700 Subject: [PATCH 2/2] chore: fix linting --- src/core/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/boot.js b/src/core/boot.js index a9a81e34d5..273db412f5 100644 --- a/src/core/boot.js +++ b/src/core/boot.js @@ -32,7 +32,7 @@ module.exports = (self) => { (cb) => { self.log('initialized') self.state.initialized() - self.emit('init'); + self.emit('init') cb(null, true) } ], (err, res) => {