summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index f2aaf44c95e..aec7a73f35c 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -522,19 +522,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);
}