From aa9504a489b7fde1645d43f0271b78647cfb6557 Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Tue, 6 Aug 2024 11:03:28 +0000 Subject: [PATCH] fan: exit with non-zero status on failure --- lib/flatware/cli.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/flatware/cli.rb b/lib/flatware/cli.rb index 6283b1e..efef951 100644 --- a/lib/flatware/cli.rb +++ b/lib/flatware/cli.rb @@ -41,7 +41,9 @@ def fan(*command) exec({ 'TEST_ENV_NUMBER' => i.to_s }, command) end end - Process.waitall + children = Process.waitall + success = children.all? { |pid, status| status.success? } + exit success ? 0 : 1 end desc 'clear', 'kills all flatware processes'