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

Legoktm created this task.Oct 28 2017, 1:26 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 28 2017, 1:26 AM

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 closed this task as Resolved.Oct 30 2017, 3:53 PM
Umherirrender triaged this task as Normal priority.