Skip to content
Snippets Groups Projects
Commit e1e27d3b authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed log in pkg setup

parent 4e05e0c9
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
from subprocess import run, DEVNULL, PIPE
from subprocess import run, DEVNULL, PIPE, STDOUT
PACKAGES = [
"bsd-mailx", # for "mail" command used in tester
......@@ -24,14 +24,15 @@ def main():
result = run(
["/usr/bin/apt", "install", "-y", pkg],
shell=False,
stdout=DEVNULL,
stderr=DEVNULL,
stdout=PIPE,
stderr=STDOUT,
stdin=PIPE,
)
if not result:
if result.returncode == 0:
print("{} install succeeded".format(pkg))
else:
print("{} install failed".format(pkg))
print(result.stdout.decode("utf-8"))
else:
print("{} already installed".format(pkg))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment