diff options
author | Greg Sabino Mullane | 2013-02-21 02:25:49 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2013-02-21 02:25:49 +0000 |
commit | f3ad31299c3f987e931af553b9bee92ffc76c5b4 (patch) | |
tree | f30406ee7972172b71bde83c74d639438fe1e123 | |
parent | 9be7ce345a02d912523c00462f754ab6cc07c46e (diff) |
Don't assume that everyone has a home. Per github issue #23
-rwxr-xr-x | check_postgres.pl | 2 |
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') { |