grunt-contrib-copy
grunt-contrib-copy copied to clipboard
mode:true has no effect
Copy file permission execute does not work. Testet on ubuntu with v0.8.0. Maybe other operating systems affected?
+1 me too. really need this to work. using grunt-chmod for now, which is a shame..
+1
I serious suggest cp -rp
:+1:
+1
not working on OSX either
+1
I made a PR to fix this here https://github.com/gruntjs/grunt-contrib-copy/pull/249
FYI - this is the commit where it happened https://github.com/gruntjs/grunt-contrib-copy/commit/7f6f25822b1c6797318062115b8a62b4e41272f6
PR not needed if we set options.mode = '755'
. I've got what I need now.
grunt.file.copy(from, to, {mode: '0755'})
by the way, does not work as well
IMHO all options that Unix cp has should be available for the standard Grunt task.
It doesn't look like the PR was ever merged. At the very least, documentation should be updated to indicate that the property only accepts octal permissions.
This config seems to preserve the file perms on MacOS:
copy: {
example: {
options: {
mode: true,
},
files: [
{
src: ['file1', 'file2'],
},
]
},
}