diff options
author | Karl Berry <karl@freefriends.org> | 2013-10-27 23:27:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-10-27 23:27:48 +0000 |
commit | d5c9f4d188cca15473dd688cafd911866a19d409 (patch) | |
tree | 99e40e6a9b67058c4e1b9e1a619bb8e59b35920d /Build/source/texk/tests | |
parent | 60eae3fcd725611175286d5ac5cca9806bbfa063 (diff) |
sync
git-svn-id: svn://tug.org/texlive/trunk@32015 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/tests')
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLUtils.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index e440b0e1020..7e5e18cd7df 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -5,7 +5,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 31511 $'; +my $svnrev = '$Revision: 31914 $'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; @@ -521,19 +521,21 @@ sub xsystem { =item C<run_cmd($cmd)> -runs a command and captures its output. Then returns a list with the -output as first element and the return value (exit code) as second. +runs shell CMD and captures its output. Returns a list with CMD's +output as the first element and the return value (exit code) as second. =cut sub run_cmd { my $cmd = shift; my $output = `$cmd`; + $output = "" if ! defined ($output); # don't return undef + my $retval = $?; if ($retval != 0) { $retval /= 256 if $retval > 0; } - return ($output, $retval); + return ($output,$retval); } |