From 4f0954b2dc03efe22476a72b01b6e3abc3accb2d Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Thu, 2 Nov 2023 03:12:26 +0100 Subject: [PATCH] restart: only suppress warnings of the 'exec' category "Statement unlikely to be reached" is the expected warning here. --- plugins/restart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/restart b/plugins/restart index faa59ca..8e77f16 100644 --- a/plugins/restart +++ b/plugins/restart @@ -1,12 +1,13 @@ #!perl + HELP "restart" => "Attempt to restart the RevBank shell"; sub command :Tab(restart) ($self, $cart, $command, @) { return NEXT if $command ne 'restart'; - no warnings; call_hooks("restart_exec"); + no warnings qw(exec); exec $0; call_hooks("restart_survived"); @@ -16,8 +17,8 @@ sub command :Tab(restart) ($self, $cart, $command, @) { sub hook_input($class, $cart, $input, $split_input, @) { return if defined $input; - no warnings; call_hooks("restart_restart"); + no warnings qw(exec); exec $0; call_hooks("restart_survived"); }