Beak icon indicating copy to clipboard operation
Beak copied to clipboard

Edit command removes file attributes

Open Jerrot opened this issue 7 years ago • 3 comments

After using beak edit and the final progress of copying the file back, the file attributes are lost. This is a little disturbing if you want to use the Shebang way to run your script, because you always need to execute the chmod again.

Jerrot avatar Jan 11 '18 10:01 Jerrot

You’re right. We could either fix that by copying the files back and forth instead of the writing from scratch that happens, or automatically set permissions on files with shebangs

yonaskolb avatar Jan 11 '18 12:01 yonaskolb

Setting permissions automatically might be a source of unwanted security issues IMHO, people might be surprised to find their files executable on base of the content, if they decided to not set the flag yet before.

Copying sounds fine to me. I didn't dive deep enough into SwiftPM (and Beak) though to provide a patch/pr myself (yet) though.

Jerrot avatar Jan 11 '18 15:01 Jerrot

@yonaskolb Any plans on fixing this (or any other Beak issue) currently? This project looks like it's not being maintained anymore ... I'd be glad to help if you don't have the time. Just make me a maintainer and I'll try to update the project without any breaking changes as good as I can.

Jeehut avatar Feb 20 '19 15:02 Jeehut