Closed batichotti closed 5 months ago
If you replace system()
with print()
, what is the output? I'd like to see the full command that was issued.
The reason, at least on Linux, is most likely that the semicolon needs to be quoted, otherwise the shell will think you're supplying two commands. Give this a try:
system(f"{cloc} --by-file-by-lang --csv --csv-delimiter='{DELIMITER}' --out={output_path}/{language}/{repository}.csv {input_path}/{language}/{repository}")
where single quotes surround the delimiter.
We fixed this problem trading the ";" to "|". Thank you for help.
And you are right, the quotes made the difference.
Bug founded on Windows and Linux
CLoC doesn't change the delimiter when --csv-delimiter=; is on. If we change the syntax to something that doesn't work the CLoC falls and raises an error, but with the syntax below nothing happens.
(context: the code is a Python script)
The result is the same without the command, just the CLoC separated by commas, but we want ; as the delimiter.
Am I wrong or is the code broken?