Skip to content

Commit

Permalink
Add support for parsing non-unix paths in compilation database (#716)
Browse files Browse the repository at this point in the history
This is selected automatically by checking the OS in which ECC is
running. Without this, `shlex` would not treat windows paths correctly.
  • Loading branch information
papadokolos authored Dec 8, 2020
1 parent 42e2ed6 commit 13b2c5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/flags_sources/compilation_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def _parse_entry(self, entry, base_path):
base_path = path.realpath(entry['directory'])
if 'command' in entry:
import shlex
argument_list = shlex.split(entry['command'])
import os
argument_list = shlex.split(entry['command'],
posix=os.name == 'posix')
elif 'arguments' in entry:
argument_list = entry['arguments']
else:
Expand Down

0 comments on commit 13b2c5b

Please sign in to comment.