sharec icon indicating copy to clipboard operation
sharec copied to clipboard

executable file

Open daiyam opened this issue 4 years ago • 7 comments

When a file is an executable in the config repository, the file isn't executable in the target project.

daiyam avatar Aug 10 '21 12:08 daiyam

Can you give an example?

epszaw avatar Aug 10 '21 12:08 epszaw

https://github.com/daiyam/sharec-config/blob/master/packages/sharec-base/configs/.husky/commit-msg is one of the files.

daiyam avatar Aug 10 '21 12:08 daiyam

I'm not sure, that it's a good idea to count executable file as config and I think, sharec shouldn't handle this kind of files.

epszaw avatar Aug 10 '21 13:08 epszaw

Why not, it's part of a default config.

daiyam avatar Aug 10 '21 14:08 daiyam

Do you want to limit sharec to only configuration files? I've look at the code and it doesn't support binary files (like an icon, a font or an image) due to read/write in 'utf-8'.

daiyam avatar Aug 10 '21 14:08 daiyam

Let's try to imagine how to satisfy your requirements in future :)

epszaw avatar Aug 10 '21 21:08 epszaw

Thx

I was thinking maybe the files commencing with a shebang (#!) can become executable. For binary files like .jpg, we could skip the merge and directly do a binary copy.

I will try to make a PR.

daiyam avatar Aug 10 '21 22:08 daiyam