Skip to content

Commit

Permalink
tools: additional fixes for nodejs#14336 to pass ‘make lint’ when pro…
Browse files Browse the repository at this point in the history
…ject path contains non-ascii characters.
  • Loading branch information
sharkfisher committed Oct 6, 2017
1 parent 1436e10 commit 511286e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ def RepositoryName(self):
fullname = self.FullName()
# XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory.
toplevel = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/')
os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/').decode('utf-8')
prefix = os.path.commonprefix([fullname, toplevel])
return fullname[len(prefix) + 1:]

Expand Down Expand Up @@ -6084,7 +6084,7 @@ def main():

_cpplint_state.ResetErrorCounts()
for filename in filenames:
ProcessFile(filename, _cpplint_state.verbose_level)
ProcessFile(filename.decode('utf-8'), _cpplint_state.verbose_level)
_cpplint_state.PrintErrorCounts()

sys.exit(_cpplint_state.error_count > 0)
Expand Down

0 comments on commit 511286e

Please sign in to comment.