diff options
-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') { |