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

style-cmake.sh should not reset file mode #112

Open
lsf37 opened this issue Sep 3, 2021 · 1 comment
Open

style-cmake.sh should not reset file mode #112

lsf37 opened this issue Sep 3, 2021 · 1 comment

Comments

@lsf37
Copy link
Member

lsf37 commented Sep 3, 2021

style-cmake.sh resets the file mode, using cmake-format with -i which always produces 644 files.

It'd be nice to keep the original file mode, since we have some cmake files that are intentionally 755.

This could be achieved in style-cmake.sh by processing files one by one, using stat to read the mode, then chmod to set it afterwards, or some such thing. Downside is that this probably will make it quite hard to deal with file names that have spaces in them.

Alternatively, we could do something similar in python inside style.py.

@lsf37
Copy link
Member Author

lsf37 commented Sep 3, 2021

(I don't think the mode reset is intentional by cmake-format)

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

No branches or pull requests

1 participant