Skip to content
This repository
Browse code

Fix #519 breaking build on OS X

  • Loading branch information...
commit d1ed27eb73639c038d79b26afe151ed8549a3e58 1 parent 2869983
Sindre Sorhus sindresorhus authored

Showing 1 changed file with 2 additions and 9 deletions. Show diff stats Hide diff stats

  1. +2 9 cli/tasks/img.js
11 cli/tasks/img.js
@@ -60,7 +60,7 @@ module.exports = function(grunt) {
60 60 opts = opts || {};
61 61 cb = cb || function() {};
62 62
63   - grunt.helper('which', 'optipng', function(err, cmdpath) {
  63 + which('optipng', function(err, cmdpath) {
64 64 if ( err ) {
65 65 return grunt.helper( 'not installed', 'optipng', cb );
66 66 }
@@ -94,7 +94,7 @@ module.exports = function(grunt) {
94 94 cb = cb || function() {};
95 95 opts.args = opts.args ? opts.args : ['-copy', 'none', '-optimize', '-outfile', 'jpgtmp.jpg'];
96 96
97   - grunt.helper('which', 'jpegtran', function(err, cmdpath) {
  97 + which('jpegtran', function(err, cmdpath) {
98 98 if ( err ) {
99 99 return grunt.helper( 'not installed', 'jpegtran', cb );
100 100 }
@@ -144,12 +144,5 @@ module.exports = function(grunt) {
144 144 cb();
145 145 }
146 146 });
147   -
148   - // **which** helper, wrapper to isaacs/which package
149   - grunt.registerHelper('which', function(cmd, cb) {
150   - if ( win32 || !/optipng|jpegtran/.test( cmd ) ) {
151   - return which( cmd, cb );
152   - }
153   - });
154 147 };
155 148

0 comments on commit d1ed27e

Please sign in to comment.
Something went wrong with that request. Please try again.