fix: print pack and lock errors on stderr

The lock refusal, "no pack for", "no manifest for" and "no pack to
verify" went to stdout, so a run redirected to a log exited 1 with
nothing on the terminal. A test reads both scripts and refuses an ERROR
line printed to stdout.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 05:22:05 +02:00
1 parent a160a5bc6b
commit 4fa598645e
4 files changed
+42 -12

No files matched your search

+3 -3
View File
@@ -108,7 +108,7 @@ class PackLockCliTest(unittest.TestCase):
]
)
self.assertEqual(proc.returncode, 1, proc.stdout + proc.stderr)
self.assertIn("is in use by another run", proc.stdout)
self.assertIn("is in use by another run", proc.stderr)
def test_every_writing_mode_refuses_a_locked_output(self):
"""Two of seven modes took the lock, and five wrote straight into it.
@@ -153,7 +153,7 @@ class PackLockCliTest(unittest.TestCase):
]
)
self.assertEqual(proc.returncode, 1, proc.stdout + proc.stderr)
self.assertIn("is in use by another run", proc.stdout)
self.assertIn("is in use by another run", proc.stderr)
def test_pipeline_refuses_locked_output(self):
with artifact_lock(self.dir):
@@ -167,7 +167,7 @@ class PackLockCliTest(unittest.TestCase):
]
)
self.assertEqual(proc.returncode, 1, proc.stdout + proc.stderr)
self.assertIn("is in use by another run", proc.stdout)
self.assertIn("is in use by another run", proc.stderr)
class HeldLockTest(unittest.TestCase):