From a438cb2d4462d6a58706798189cffb2e6019cf87 Mon Sep 17 00:00:00 2001 From: Alex Cameron Date: Thu, 20 Jan 2022 00:44:20 +1100 Subject: [PATCH] _virtual_env: Pipe installation output to /dev/null (#226) --- pip_audit/_virtual_env.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pip_audit/_virtual_env.py b/pip_audit/_virtual_env.py index 6a15d839..52d9a09c 100644 --- a/pip_audit/_virtual_env.py +++ b/pip_audit/_virtual_env.py @@ -102,7 +102,12 @@ def post_setup(self, context): *self._install_args, ] try: - subprocess.run(package_install_cmd, check=True) + subprocess.run( + package_install_cmd, + check=True, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + ) except subprocess.CalledProcessError as cpe: raise VirtualEnvError(f"Failed to install packages: {package_install_cmd}") from cpe