Fix bug preventing compiler output from displaying
This commit is contained in:
parent
57722e7087
commit
6ad414f253
|
@ -78,9 +78,9 @@ class Compiler(ABC):
|
||||||
print(cmd)
|
print(cmd)
|
||||||
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
|
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
|
||||||
if Config().get_boolean("DEBUG", "COMPILERS"):
|
if Config().get_boolean("DEBUG", "COMPILERS"):
|
||||||
print(output.decode())
|
print(output.decode(errors="replace"))
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
for line in e.output.decode().split("\n"):
|
for line in e.output.decode(errors="replace").split("\n"):
|
||||||
if re.search(r"error", line, re.IGNORECASE):
|
if re.search(r"error", line, re.IGNORECASE):
|
||||||
print(f" [-] Error: {line}")
|
print(f" [-] Error: {line}")
|
||||||
if re.search(r"warning", line, re.IGNORECASE):
|
if re.search(r"warning", line, re.IGNORECASE):
|
||||||
|
@ -106,4 +106,4 @@ class Compiler(ABC):
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def set_debug(self):
|
def set_debug(self):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue