thenativeweb/roboter

Search shell commands also in current project's node_modules/.bin folder

StefanScherer opened this issue · 1 comments

Another convenient feature of npm is that it automatically finds the mongodb-runner script which is stored in node_modules/.bin. I tried to add some universal/shell tasks

    task('universal/shell', {
      pretest: 'mongodb-runner start --topology=standalone --port=27717',
      posttest: 'mongodb-runner stop'
    });

But running bot pretest does not work as expected:

$ bot pretest
[11:02:01] Using gulpfile ~/code/sealsystems/node-mongo/roboter.js
[11:02:01] Starting 'pretest'...
/bin/sh: mongodb-runner: command not found
[11:02:01] 'pretest' errored after 95 ms
[11:02:01] Error in plugin 'pretest'
Message:
    Failed to execute.

This is true, but this will be fixed in the upcoming release of roboter, which was rewritten from scratch.

(IOW we won't fix this any more for the current version.)