mongodb-js / is-mongodb-running

Is MongoDB running? What port is it using?
Apache License 2.0
3 stars 3 forks source link

Fix windows support and fix Travis CI failure #9

Closed addisonElliott closed 6 years ago

addisonElliott commented 6 years ago

Fix two issues in the repository:

  1. Fix eslint errors that cause Travis CI to fail. The error is a no-shadow issue with shadowing variables but this is not actually happening because the variables are defined in an if/else block so they will never shadow each other. Anyway, I fixed this by moving the declaration out of the if/else block
  2. Fix windows support but updating the command string to search for in ps.lookup.
    • Rather than searching only for mongod.exe in Windows, I search for mongod or mongod.exe because both are valid commands in Windows.
    • When using mongodb-runner start command in Windows, the ps.lookup command returns mongod and not mongod.exe. Therefore, it would incorrectly state no instances are running when one was.
addisonElliott commented 6 years ago

Bump.

imlucas commented 6 years ago

Thanks @addisonElliott!