Don’t print the output of uv pip compile
- ID
2d30149- date
2025-04-23 07:44:26+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
56fc369- message
Don't print the output of `uv pip compile`- changed files
1 file, 5 additions, 2 deletions
Changed files
python/pip_compile (1278) → python/pip_compile (1457)
diff --git a/python/pip_compile b/python/pip_compile
index ef18e0e..319455d 100755
--- a/python/pip_compile
+++ b/python/pip_compile
@@ -32,11 +32,14 @@ def compile_requirements_file(in_file: str, *, upgrade: bool) -> None:
if upgrade:
cmd.append("--upgrade")
- # Actually run the command, and print a debug entry for it
+ # Actually run the command, and print a debug entry for it.
+ #
+ # `uv pip compile` prints the generated `requirements.txt` file to
+ # stdout, so we pipe that to /dev/null -- we're writing it to a file.
subprocess.check_call(
["/Users/alexwlchan/repos/scripts/debug/print_info", f"-> {shlex.join(cmd)}"]
)
- subprocess.check_call(cmd)
+ subprocess.check_call(cmd, stdout=subprocess.DEVNULL)
if __name__ == "__main__":