Skip to content

Commit

Permalink
fix(build): Fix stylelint on Windows (shaka-project#3214)
Browse files Browse the repository at this point in the history
  • Loading branch information
surajkumar-sk authored Mar 15, 2021
1 parent 6927032 commit 568321c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def check_css_lint(args):
def get(*path_components):
return shakaBuildHelpers.get_all_files(
os.path.join(base, *path_components), match)
files = (get('ui') + get('demo'));
files = (get('ui') + get('demo'))
config_path = os.path.join(base, '.csslintrc')

linter = compiler.CssLinter(files, config_path)
Expand Down
4 changes: 4 additions & 0 deletions build/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ def lint(self, fix=False, force=False):
deps = self.source_files + [self.config_path]
if not force and not _must_build(self.output, deps):
return True
# Windows shows an error when the file location has '\' .
if sys.platform == 'win32':
self.config_path = self.config_path.replace('\\', '/')
self.source_files = [f.replace('\\', '/') for f in self.source_files]

stylelint = shakaBuildHelpers.get_node_binary('stylelint')
cmd_line = stylelint + [
Expand Down

0 comments on commit 568321c

Please sign in to comment.