mirror of
https://github.com/klezVirus/inceptor.git
synced 2024-06-16 11:58:42 +00:00
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user