diff --git a/tasks/task-helpers.coffee b/tasks/task-helpers.coffee index 1d682b3e2..89e4c65e5 100644 --- a/tasks/task-helpers.coffee +++ b/tasks/task-helpers.coffee @@ -4,6 +4,9 @@ walkdir = require 'walkdir' module.exports = (grunt) -> cp: (source, destination, {filter}={}) -> + unless grunt.file.exists(source) + grunt.fatal("Cannot copy non-existent #{source.cyan} to #{destination.cyan}") + try walkdir.sync source, (sourcePath, stats) -> return if filter?.test(sourcePath)