sindresorhus/cpy-cli

.sh file permission changed?

chadbr opened this issue · 2 comments

I have a .sh file with +x permissions on it. When I copy it:

cpy \"**/*.sh\" \"../dist/\" --cwd=src --parents

it's execute permissions are stripped / not maintained.

Is it expected?

Thanks! Chad

Permission should be preserved, otherwise it's a bug.

We do it here: https://github.com/sindresorhus/cp-file/blob/89dc5f36d248bfc9c42c853f40594b78156f64e5/index.js#L52

Would be helpful if you could submit a failing test to cp-file.

I just tried to reproduce with latest cpy-cli and I cannot reproduce it. If it's still an issue, please submit a failing test.