-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy file modes (permission...) to copied files #97
Conversation
BenjaminDobler
commented
Aug 26, 2013
- adding file mode (permission…) to copied files (related to: Corrupted copy #24)
this should be optional, as an option, due the extra FS lookups just to get permissions that not everyone/use case cares about. |
…lt false) so you have to explicitly set it.
Makes sense to me. I added the option "copyMode". |
Thanks for the PR. Could you make this an option instead of using Also since we're adding this option, would it make sense to just also let the mode be set through the option? For example: var options = this.options({
mode: false,
});
// ...
if (options.mode !== false) {
fs.chmodSync(dest, (options.mode === true) ? fs.lstatSync(src).mode : options.mode);
} |
- mode is now an option and optionally mode settings can be passed rather than copied from the original file
@shama like this approach as well cause you don`t have to pass the option for every file. Change committed! |
Thanks! |
Last update was 7 months ago. Is there anything stopping project admins from pushing a new version with this option to npm? |
Hey @unindented and @michaellopez backwards compatibility (current and future) is really important to us, so we really need to be careful how we publish this on npm. Grunt core supposed to get this fix but didn't. The fix is postponed to 0.4.3.
If you have time, you can really help us by joining the discussion here: gruntjs/grunt#732 and helping us test this fix. (Also gruntjs/grunt#615, but I think #732 is the one that has a link to the fixed branch) |
@vladikoff Thanks for your quick reply. I understand what you're saying. I was unaware of the issues in Grunt core, hence my question. Now that I know I might be able to help there. |