Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #519 breaking build on OS X

  • Loading branch information...
commit d1ed27eb73639c038d79b26afe151ed8549a3e58 1 parent 2869983
@sindresorhus sindresorhus authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 cli/tasks/img.js
View
11 cli/tasks/img.js
@@ -60,7 +60,7 @@ module.exports = function(grunt) {
opts = opts || {};
cb = cb || function() {};
- grunt.helper('which', 'optipng', function(err, cmdpath) {
+ which('optipng', function(err, cmdpath) {
if ( err ) {
return grunt.helper( 'not installed', 'optipng', cb );
}
@@ -94,7 +94,7 @@ module.exports = function(grunt) {
cb = cb || function() {};
opts.args = opts.args ? opts.args : ['-copy', 'none', '-optimize', '-outfile', 'jpgtmp.jpg'];
- grunt.helper('which', 'jpegtran', function(err, cmdpath) {
+ which('jpegtran', function(err, cmdpath) {
if ( err ) {
return grunt.helper( 'not installed', 'jpegtran', cb );
}
@@ -144,12 +144,5 @@ module.exports = function(grunt) {
cb();
}
});
-
- // **which** helper, wrapper to isaacs/which package
- grunt.registerHelper('which', function(cmd, cb) {
- if ( win32 || !/optipng|jpegtran/.test( cmd ) ) {
- return which( cmd, cb );
- }
- });
};
Please sign in to comment.
Something went wrong with that request. Please try again.