Skip to content

Commit

Permalink
Merge pull request #82 from echaozh/master
Browse files Browse the repository at this point in the history
Add license file target only if src exists
  • Loading branch information
vladikoff committed May 11, 2014
2 parents 71aaa6e + 9743cfb commit a4c10e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/init.js
Expand Up @@ -336,7 +336,9 @@ module.exports = function(grunt) {
addLicenseFiles: function(files, licenses) {
licenses.forEach(function(license) {
var fileobj = helpers.expand({filter: 'isFile'}, 'licenses/LICENSE-' + license)[0];
files['LICENSE-' + license] = fileobj ? fileobj.rel : null;
if(fileobj) {
files['LICENSE-' + license] = fileobj.rel;
}
});
},
// Given an absolute or relative source path, and an optional relative
Expand Down

0 comments on commit a4c10e1

Please sign in to comment.