Browse Source

Clean up handling output

Nathaniel van Diepen 3 years ago
parent
commit
12581544f8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      pacman_repo/repo.py

+ 3 - 2
pacman_repo/repo.py

@@ -10,10 +10,11 @@ class Package(object):
 
     def _exec(self, *args):
         try:
-            subprocess.check_output(args, cwd=self.path)
+            subprocess.run(args, cwd=self.path, capture_output=True, check=True,
+                    text=True)
 
         except subprocess.CalledProcessError as e:
-            print(e.stderr)
+            print("\n".join([e.stdout,e.stderr]))
 
     def _git(self, *args):
         self._exec('git', *args)