Hi, on Windows the path in commands is not always posix compatible, when doing arguments splitting using shlex.split we may need to specify posix parameter accordingly.
Below is a quick fix. (Sorry for not sending the PR, it won't pass the tests due to the path separator and string quote issue
diff --git a/compdb/backend/json.py b/compdb/backend/json.py
index 415630a..7a783aa 100644
--- a/compdb/backend/json.py
+++ b/compdb/backend/json.py
@@ -45,7 +45,7 @@ class JSONCompilationDatabase(CompilationDatabaseInterface):
else:
# PERFORMANCE: I think shlex is inherently slow,
# something performing better may be necessary
- arguments = shlex.split(d['command'])
+ arguments = shlex.split(d['command'], posix = os.name == "posix")
return CompileCommand(d['directory'], d['file'], arguments,
d.get('output'))
Hi, on Windows the path in commands is not always posix compatible, when doing arguments splitting using
shlex.split
we may need to specifyposix
parameter accordingly.Below is a quick fix. (Sorry for not sending the PR, it won't pass the tests due to the path separator and string quote issue