-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to programmatically customize profile files (#1770)
- Loading branch information
Showing
13 changed files
with
679 additions
and
186 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
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
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
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
19 changes: 19 additions & 0 deletions
19
aws/rust-runtime/aws-config/src/profile/location_of_profile_files.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Location of Profile Files | ||
* The location of the config file will be loaded from the `AWS_CONFIG_FILE` environment variable | ||
with a fallback to `~/.aws/config` | ||
* The location of the credentials file will be loaded from the `AWS_SHARED_CREDENTIALS_FILE` | ||
environment variable with a fallback to `~/.aws/credentials` | ||
|
||
The location of these files can also be customized programmatically using [`ProfileFiles`](crate::profile::profile_file::ProfileFiles). | ||
|
||
## Home directory resolution | ||
Home directory resolution is implemented to match the behavior of the CLI & Python. `~` is only | ||
used for home directory resolution when it: | ||
- Starts the path | ||
- Is followed immediately by `/` or a platform specific separator. (On windows, `~/` and `~\` both | ||
resolve to the home directory. | ||
|
||
When determining the home directory, the following environment variables are checked: | ||
- `HOME` on all platforms | ||
- `USERPROFILE` on Windows | ||
- The concatenation of `HOMEDRIVE` and `HOMEPATH` on Windows (`$HOMEDRIVE$HOMEPATH`) |
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
Oops, something went wrong.