Skip to content

Commit

Permalink
Add check for syncTimestamp based on relevant option (gruntjs#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
relaxatorium authored and XhmikosR committed Nov 16, 2017
1 parent 802eb27 commit b508a56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ module.exports = function(grunt) {
} else {
grunt.verbose.writeln('Copying ' + chalk.cyan(src) + ' -> ' + chalk.cyan(dest));
grunt.file.copy(src, dest, copyOptions);
syncTimestamp(src, dest);
if (options.timestamp !== false) {
syncTimestamp(src, dest);
}
if (options.mode !== false) {
fs.chmodSync(dest, (options.mode === true) ? fs.lstatSync(src).mode : options.mode);
}
Expand Down

0 comments on commit b508a56

Please sign in to comment.