mikaelbr/gulp-notify

Could not send message

Anenth opened this issue · 6 comments

gulp-notify is throwing an internal error when passing certain error messages on OSX.

Error message from gulp:

Could not send message: Command failed: /bin/sh: -c: line 2: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 7: syntax error: unexpected end of file

gulp task

gulp.task('styles', function () {
  return gulp.src(path.styles.src)
  .pipe($.plumber({errorHandler: $.notify.onError('<%= error.message %>')}))
  .pipe($.rubySass({
    style: 'expanded',
    precision: 10,
    sourcemap: true
  }))
  .pipe($.plumber.stop())
  .pipe($.autoprefixer('last 1 version'))
  .pipe(gulp.dest(path.styles.dist))
  .pipe($.size());
});

i am using the version 1.2.5

Might seem like there is some normalising issue, where as tick isn't escaped, causing an error for the terminal commando. Could you please give an example error message you try to pass in, so I can reproduce this and write tests?

Syntax error: Undefined mixin 'box-sizing'.
        on line 3 of **/_grid.scss, in `box-sizing'
        from line 3 of **/_grid.scss
        from line 11 of **/_neat.scss
        from line 3 of **/application.scss

Thanks! I will look into it as soon as I am able.

That should fix it for you. Would be great if you could confirm.
Diff for fix: mikaelbr/node-notifier@971e047

awesome man u are really fast!
that worked but it added /box-sizing'/` but thats okay i guess

I've fixed this now in mikaelbr/node-notifier v2.0.6 (mikaelbr/node-notifier@2eb4720). It seems not to be necessary to escape single quotes.