From 6344550dcc74c84bf7c77c45ca329aa6458d55ee Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 6 Feb 2008 14:12:39 +0000 Subject: (run_rpm) skip empty environment variables --- Rpmdrake/pkg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index a3abf300..ed46174a 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -83,7 +83,7 @@ sub parse_compssUsers_flat() { sub run_rpm { foreach (qw(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)) { - local $ENV{$_} = $ENV{$_} . '.UTF-8' if $ENV{$_} !~ /UTF-8/; + local $ENV{$_} = $ENV{$_} . '.UTF-8' if $ENV{$_} && $ENV{$_} !~ /UTF-8/; } my @l = `@_`; wantarray() ? @l : join('', @l); -- cgit v1.2.1