Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ By default, the utility prints out the `export` statements for the credentials (

```bash
aws-sso-cli() {
command aws-sso-cli "$@" | while read -r line; do
if [[ $line =~ ^export ]]; then
eval $line
local tmp_file=$(mktemp)
command aws-sso-cli "$@" > "$tmp_file"
while IFS= read -r line; do
if [[ "$line" =~ 'export AWS_' ]]; then
eval "$line"
fi
done
done < "$tmp_file"
rm "$tmp_file"
}
```

Expand Down