jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/387029 )

Change subject: Whitelist `application/x-dosexec` when run on Windows
......................................................................


Whitelist `application/x-dosexec` when run on Windows

On Windows, is_executable() returns true for all .exe files.
Whitelist their mime type on Windows only to avoid false positives,
as we still want them to be non-executable in Git.

Bug: T179224
Change-Id: If3a7a1ba37dc5f8cfad97cf978dfc51d31049086
---
M src/CheckCommand.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Umherirrender: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Anomie: Looks good to me, approved



diff --git a/src/CheckCommand.php b/src/CheckCommand.php
index 2955393..19840f6 100644
--- a/src/CheckCommand.php
+++ b/src/CheckCommand.php
@@ -147,6 +147,12 @@
                                return realpath( $path . '/' . $a );
                        }, $config['ignore'] );
                }
+
+               if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) {
+                       // On Windows, is_executable() always returns true, so 
whitelist those
+                       // files
+                       $this->whitelist[] = 'application/x-dosexec';
+               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/387029
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If3a7a1ba37dc5f8cfad97cf978dfc51d31049086
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to