_, err = subprocess.Popen(iwyu, stderr=subprocess.PIPE, text=True).communicate()
This line will fail occasionally because subprocess does not appropriately escape strings. This issue can be resolved by turning iwyu into a string and setting shell=True.
These settings are why the below runs without issue:
def build(command: List[str], directory: str):
"""Runs a command as a subprocess to build a .i file in the target directory"""
os.chdir(directory)
try:
subprocess.check_call(" ".join(command), shell=True)
This issue was identified during the last day of development but an appropriate solution beyond shell=True has not been identified.
This line will fail occasionally because subprocess does not appropriately escape strings. This issue can be resolved by turning iwyu into a string and setting shell=True.
These settings are why the below runs without issue:
This issue was identified during the last day of development but an appropriate solution beyond shell=True has not been identified.