tschaub / grunt-newer

Configure Grunt tasks to run with newer files only.
https://npmjs.org/package/grunt-newer
MIT License
945 stars 53 forks source link

Handle an empty list of source files #56

Closed ruslansagitov closed 9 years ago

ruslansagitov commented 9 years ago

There’s a possibility that the list of source files could be empty. Review:

taskName: {
    src: 'src/**/*.js',
    dest: 'build/dist.js'
}

If there’re no *.js files in the src directory, grunt-newer fails in the anyNewer function, on fs.stat(paths[complete], …), with:

Fatal error: path must be a string

Right now, “path” is undefined.

tschaub commented 9 years ago

Thanks for the fix @ruslansagitov. I've pulled this in as part of #63.