From f3ad31299c3f987e931af553b9bee92ffc76c5b4 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 20 Feb 2013 21:25:49 -0500 Subject: Don't assume that everyone has a home. Per github issue #23 --- check_postgres.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 041e520ce..9cffd2c9d 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -865,7 +865,7 @@ if (! $opt{'no-check_postgresrc'}) { if (-e '.check_postgresrc') { $rcfile = '.check_postgresrc'; } - elsif (-e "$ENV{HOME}/.check_postgresrc") { + elsif (exists $ENV{HOME} and -e "$ENV{HOME}/.check_postgresrc") { $rcfile = "$ENV{HOME}/.check_postgresrc"; } elsif (-e '/etc/check_postgresrc') { -- cgit v1.2.3