Skip to content

Commit e706e25

Browse files
Tweaked exception message
1 parent 5f089e2 commit e706e25

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Loader.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,8 @@ public function load()
7474
*/
7575
protected function ensureFileIsReadable()
7676
{
77-
$filePath = $this->filePath;
78-
if (!is_readable($filePath) || !is_file($filePath)) {
79-
throw new InvalidPathException(sprintf(
80-
'Dotenv: Environment file .env not found or not readable. '.
81-
'Create file with your environment settings at %s.',
82-
$filePath
83-
));
77+
if (!is_readable($this->filePath) || !is_file($this->filePath)) {
78+
throw new InvalidPathException(sprintf('Unable to read the environment file at %s.', $this->filePath));
8479
}
8580
}
8681

0 commit comments

Comments
 (0)