grunt-contrib-copy
grunt-contrib-copy copied to clipboard
Fully respect options.timestamp for all syncTimestamps calls in the task?
I noticed some strange behavior with the copy tasks on a server-based grunt build. The first file itself was copying OK, but when the task attempted to sync the timestamps (via syncTimestamps in the task), an EPERM error was being thrown by the system (linux). Now the underlying reason was that I was not the owner of the file, but the group I am in does have group write permissions on the build files.
Anyway, while debugging this I looked at the task source, and noticed that while there are 2 calls to syncTimestamps, only one of them (as a post-processing type of loop) respects the options.timestamp setting. Patching the other call (which is right after the actual file copy) to check for options.timestamp as well fixed my issue, and if it's worthwhile for others, I can share my patch here with a pull request.
Thanks!