Page MenuHomePhabricator

Improve handling of .exe files in MinusX
Closed, ResolvedPublic

Description

It seems like is_executable() will always return true for .exe files when you're using Windows (thanks for @ashley for checking for me). On Linux it actually checks if the executable bit is set. So currently MinusX is OK with .exe files on Linux, but on Windows it will fail, leading to https://gerrit.wikimedia.org/r/#/c/386966/

I think the situation we want is that these files are not +x in git, but the tool should pass regardless of OS it's run on. I propose that we whitelist application/x-dosexec only when it is run on Windows. Does that sound reasonable?

Event Timeline

I would support this. The minus-x script is not helpful on windows, because the git setting core.filemode is often set to false to avoid false positive on changes, but it should, at least, pass.

Change 387029 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/tools/minus-x@master] Whitelist application/x-dosexec when run on Windows

https://gerrit.wikimedia.org/r/387029

Change 387029 merged by jenkins-bot:
[mediawiki/tools/minus-x@master] Whitelist application/x-dosexec when run on Windows

https://gerrit.wikimedia.org/r/387029

Umherirrender triaged this task as Medium priority.