-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I've been trying this out on my Windows machine, and The OS didn't know that the binaries were executable files because they didn't have the .exe file suffix.
Example after installing v12 in a python venv
After changing .exe to the clang-format binary file's suffix, I got the expected behavior:
(venv) PS path\to\GitHub\cpp-linter-action> clang-format-12.exe --version
clang-format version 12.0.0I'm guessing the fix for this would involve modifying the call to
clang-tools-pip/clang_tools/install.py
Line 66 in 4b49644
| def move_and_chmod_binary(old_file_name, new_file_name, directory) -> None: |
or simply adjusting the
new_file_name arg for the Windows platform within the mv_and_chmod() function.
Other Windows considerations
os.chmod() has limited support on Windows. The docs specifically note:
Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
I'm not entirely familiar with Unix permission's octal format, but using 0o755 didn't raise any exceptions.
ps - I also would like it if clang-tools -i 12 installed 12.0.1 instead of the older 12.0.0
