Bug 1578673 - [mozlint] Skip the file-perm linter on Windows r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D44635

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sylvestre Ledru 2019-09-04 13:06:29 +00:00
Родитель 4914daa1d0
Коммит 4203206dd6
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -5,6 +5,7 @@
from __future__ import absolute_import
import os
import platform
from mozlint import result
from mozlint.pathutils import expand_exclusions
@ -13,6 +14,12 @@ results = []
def lint(paths, config, fix=None, **lintargs):
if platform.system() == 'Windows':
# Windows doesn't have permissions in files
# Exit now
return results
files = list(expand_exclusions(paths, config, lintargs['root']))
for f in files:
if os.access(f, os.X_OK):