Skip to content

Commit 501ab40

Browse files
committed
Apply PR practicalmeteor#68 to code
1 parent c7a5775 commit 501ab40

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Cakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'coffee-script/register'
2+
13
ChildProcess = require './lib/ChildProcess'
24

35
mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/*Test.coffee"

lib/Meteor.coffee

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ class Meteor extends EventEmitter
187187
hasStartedMongoDBText: (buffer)=>
188188
if buffer.lastIndexOf('Started MongoDB') isnt -1
189189
@mongodb = new MeteorMongodb(@childProcess.child.pid)
190-
@emit "mongodb ready"
191190

192191

193192
hasErrorText: (buffer)=>

lib/MeteorMongodb.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ class MeteorMongodb extends EventEmitter
3030
ppid: @meteorPid
3131
, (err, resultList )=>
3232
@mongodChilds = resultList
33-
if (err)
33+
if (err || resultList.length == 0)
3434
log.warn "spacjam: Warning: Couldn't find any mongod children:\n", err
3535
else if resultList.length > 1
3636
log.warn "spacjam: Warning: Found more than one mongod child:\n", resultList
3737
else
3838
log.debug "Found meteor mongod child with pid: ", resultList[0].pid
39+
@emit "mongodb ready"
3940

4041

4142
kill: ->

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spacejam",
3-
"version": "1.6.1",
3+
"version": "1.6.1-pr68",
44
"dependencies": {
55
"chai": "1.9.2",
66
"glob": "4.0.6",

0 commit comments

Comments
 (0)