m19c / gulp-run

Pipe to shell commands in gulp
ISC License
151 stars 25 forks source link

When verbosity!==0 everything fails #4

Closed koresar closed 10 years ago

koresar commented 10 years ago

Hello. In your unit tests put {verbosity:1} in any of them and you will see everything crashes. As the result the current version of gulp-run is unusable.

  1) gulp-run includes `node_modules/.bin` on the PATH:
     TypeError: Object $ echo $PATH # Silenced
 has no method 'indexOf'
      at writeToBuffer (/home/vasyl/code/bt/main/node_modules/gulp-run/lib/line-buffered-stream.js:32:24)
      at Transform._transform (/home/vasyl/code/bt/main/node_modules/gulp-run/lib/line-buffered-stream.js:42:5)
      at Transform._read (_stream_transform.js:179:10)
      at Transform._write (_stream_transform.js:167:12)
      at doWrite (_stream_writable.js:226:10)
      at writeOrBuffer (_stream_writable.js:216:5)
      at Transform.Writable.write (_stream_writable.js:183:11)
      at EventEmitter.Logger.write (/home/vasyl/code/bt/main/node_modules/gulp-run/lib/logger.js:38:15)
      at EventEmitter.Logger.log (/home/vasyl/code/bt/main/node_modules/gulp-run/lib/logger.js:53:7)
cbarrick commented 10 years ago

Good catch. The specs were set to verbosity:0 to not interfere with the output, but because of that I didn't notice I had broken the logger. And I hadn't updated the deps in the project I wrote this for :/

Anyway, I've got a fix ready to push. I replaced the simple buffered stream used by the logger with a better one that I'm in the process of releasing as its own module. If all goes as planned, I'll get that module released and push the fix today or tomorrow.

koresar commented 10 years ago

Thanks mate.

gulp-run is much better than gulp-shell because gulp-run runs anything (including ruby, js and other scripts) unlike the gulp-shell. You would better state this fact in Readme.md.

Also the ./node_modules/.bin as part of PATH feature is marvelous!

Cheers