-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safely handle missing credentials.d folder
The `$HOME/.aws/credentials.d` folder is not required to exist, as all credential configurations can be defined on `$HOME/.aws/credentials` instead. The early return with the `?` operator caused the binary to fail if the optional folder did not exist, but worked if the folder existed but was empty. This commit refactors the code the avoid crashing when the `$HOME/.aws/credentials.d` does not exist. It is collecting into a Vector instead of chaining the streams as it would required Boxed Streams to switch between `ReadDirStream` and `stream::empty` in case of an `Err`.
- Loading branch information
Showing
1 changed file
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters