commit 87197963c50542b16a624c522fd3a2e6829d9f0e from: Omar Polo date: Wed Jun 29 11:05:58 2022 UTC tweak error handling in got_* while here also add a comment in got so I don't forget why I'm doing an open(-|). commit - afdbc7b01799591096e1c2e73dea99129a22d5ff commit + 87197963c50542b16a624c522fd3a2e6829d9f0e blob - 7629c1752f8cf5a2e700f2766fa64740812c32e7 blob + cdfdaba4145103be38cd39a743b8c26c2fedb626 --- plass +++ plass @@ -161,19 +161,18 @@ sub passfind { } sub got { + # discard stdout open my $fh, '-|', ($got, @_); close($fh); - return !$?; + exit 1 if $?; } sub got_add { - got 'add', '-I', shift - or exit 1; + got 'add', '-I', shift; } sub got_rm { - got 'remove', '-f', shift - or exit 1; + got 'remove', '-f', shift; } sub got_ci {