Skip to content

Commit b67ce51

Browse files
author
Sébastien HOUZÉ
authored
fix: edge case where aws config file could be a directory (#890)
I have encountered this issue on github actions This is weird but I an error with file_get_contents failing.
1 parent ba62a32 commit b67ce51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Credentials/IniFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function loadProfiles(array $filepaths): array
4848
$homeDir = $homeDir ?? $this->getHomeDir();
4949
$filepath = $homeDir . \substr($filepath, 1);
5050
}
51-
if (!\is_readable($filepath)) {
51+
if (!\is_readable($filepath) || !\is_file($filepath)) {
5252
continue;
5353
}
5454

0 commit comments

Comments
 (0)