summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2013-02-21 02:25:49 +0000
committerGreg Sabino Mullane2013-02-21 02:25:49 +0000
commitf3ad31299c3f987e931af553b9bee92ffc76c5b4 (patch)
treef30406ee7972172b71bde83c74d639438fe1e123
parent9be7ce345a02d912523c00462f754ab6cc07c46e (diff)
Don't assume that everyone has a home. Per github issue #23
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
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') {