Skip to content
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

Keep exec mode on file copy #235

Closed
jdespatis opened this issue May 14, 2013 · 8 comments
Closed

Keep exec mode on file copy #235

jdespatis opened this issue May 14, 2013 · 8 comments

Comments

@jdespatis
Copy link
Contributor

Hello,

I'm using this.copy("fromFile.sh", "toFile.sh") to copy a file which has 0755 as chmod on a Linux.
This chmod is lost on the copy and not applied to toFile.sh

Why not adding a third param keepMode to actions.copy and actions.template, to tell to keep or not the mode?

Or maybe keep the mode by default (espacially the +x mod, if it applies to current OS) ?

@jdespatis
Copy link
Contributor Author

And if exec mode is kept, it would be nice to add a specific color during the copy process on the shell to show executables that have been copied :)

@passy
Copy link
Member

passy commented May 14, 2013

I think copying modes should be the default. Looking into it.

@sindresorhus
Copy link
Member

@passy here too I think it should be modeled after the grunt.file.copy method.

@passy
Copy link
Member

passy commented May 14, 2013

@sindresorhus Looks like grunt.file.copy doesn't retain the file permissions. :/

passy added a commit to passy/generator that referenced this issue May 14, 2013
@sindresorhus
Copy link
Member

@passy gruntjs/grunt#732

@jdespatis
Copy link
Contributor Author

Thanks for this feature added to yeoman.
I'll play with it as soon as it will be released :)

@jdespatis
Copy link
Contributor Author

I close as @passy has done the appropriate PR
Closing is so good...

@ChuckJonas
Copy link

what's the solution here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants