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

Remove unnecessary executable flags from Rust source files #12707

Merged
merged 1 commit into from Mar 25, 2024

Conversation

mamekoro
Copy link
Contributor

@mamekoro mamekoro commented Mar 25, 2024

Objective

I found that some .rs files are unnecessarily executable.

Rust source files may start with a shebang-like statement #!, so let's make sure they are not executable just in case.

Here is the result of the find commend that lists executable .rs files as of main branch 86bd648.

$ find -name \*.rs -type f -executable
./crates/bevy_gizmos/src/lib.rs
./crates/bevy_tasks/src/lib.rs
./crates/bevy_time/src/lib.rs
./crates/bevy_transform/src/lib.rs
./src/lib.rs

It appears that the permissions of those files were originally 644, but were unexpectedly changed to 755 by commit 52e3f20.

Solution

Make them not executable by using this command;
find -name \*.rs -type f -executable -exec chmod --verbose a-x -- {} \+

@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change A-Cross-Cutting Impacts the entire engine labels Mar 25, 2024
@james7132 james7132 added this pull request to the merge queue Mar 25, 2024
Merged via the queue into bevyengine:main with commit cb9789b Mar 25, 2024
28 of 29 checks passed
@mamekoro mamekoro deleted the fix-file-permission branch March 26, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Cross-Cutting Impacts the entire engine C-Code-Quality A section of code that is hard to understand or change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants