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 #!/usr/bin/env python3
from subprocess import run, DEVNULL, PIPE from subprocess import run, DEVNULL, PIPE, STDOUT
PACKAGES = [ PACKAGES = [
"bsd-mailx", # for "mail" command used in tester "bsd-mailx", # for "mail" command used in tester
...@@ -24,14 +24,15 @@ def main(): ...@@ -24,14 +24,15 @@ def main():
result = run( result = run(
["/usr/bin/apt", "install", "-y", pkg], ["/usr/bin/apt", "install", "-y", pkg],
shell=False, shell=False,
stdout=DEVNULL, stdout=PIPE,
stderr=DEVNULL, stderr=STDOUT,
stdin=PIPE, stdin=PIPE,
) )
if not result: if result.returncode == 0:
print("{} install succeeded".format(pkg)) print("{} install succeeded".format(pkg))
else: else:
print("{} install failed".format(pkg)) print("{} install failed".format(pkg))
print(result.stdout.decode("utf-8"))
else: else:
print("{} already installed".format(pkg)) 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