From 407f7b8528c0a34eb0508ffe3cb4c144fba16e01 Mon Sep 17 00:00:00 2001 From: mauke Date: Fri, 24 Nov 2023 00:10:18 +0100 Subject: [PATCH] fix exit status `exit` has higher precedence than `?:`, so `exit $result->was_successful ? 0 : 1` parses as `(exit $result->was_successful) ? 0 : 1`, which is not what was intended. --- lib/Pinto/Server/Responder/Action.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Pinto/Server/Responder/Action.pm b/lib/Pinto/Server/Responder/Action.pm index ad7f77ab..e93fc8b5 100644 --- a/lib/Pinto/Server/Responder/Action.pm +++ b/lib/Pinto/Server/Responder/Action.pm @@ -116,7 +116,7 @@ sub child_proc { print {$writer} $PINTO_PROTOCOL_STATUS_OK . "\n" if $result->was_successful; - exit $result->was_successful ? 0 : 1; + exit($result->was_successful ? 0 : 1); } #-------------------------------------------------------------------------------