commit: ea8162cb6dde42c2c827bea7c19d7f2eee9d59fd Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> AuthorDate: Thu Apr 30 22:56:36 2020 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Thu Apr 30 22:56:36 2020 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=ea8162cb
probe-mirmon: improve capture usage Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> probe-mirmon | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/probe-mirmon b/probe-mirmon index cd97274..b0c3413 100755 --- a/probe-mirmon +++ b/probe-mirmon @@ -83,9 +83,8 @@ sub handle_rsync { $file =~ s/\W/_/g; # translate all non-letters to _ # https://stackoverflow.com/a/6331618/1583179 - my $ret; - my ($stdout, $stderr) = capture { - $ret = system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file"; + my ($stdout, $stderr, $ret) = capture { + system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file"; }; if ($ret!=0) { #warn "rsync failed, exit code $fail, $! $? $@\n";