-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for windows for awsp & awsr (#1)
* add support for windows for awsp & awsr * update version --------- Co-authored-by: Snigdhajyoti Ghosh <snigdhasjg@users.noreply.github.com>
- Loading branch information
1 parent
2c61bf2
commit 834b396
Showing
5 changed files
with
63 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.6.1' | ||
__version__ = '1.6.2' |
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 @@ | ||
# Switch AWS Fusion profile | ||
aws-fusion config-switch profile | ||
if ($LASTEXITCODE -ne 0) { | ||
return | ||
} | ||
|
||
# Read the selected profile | ||
$selectedProfile = Get-Content "$HOME\.aws\fusion\profile" | ||
|
||
# Unset AWS_REGION | ||
Remove-Item Env:AWS_REGION -ErrorAction SilentlyContinue | ||
|
||
if ([string]::IsNullOrWhiteSpace($selectedProfile)) { | ||
# Unset AWS_PROFILE for default profile | ||
Remove-Item Env:AWS_PROFILE -ErrorAction SilentlyContinue | ||
} else { | ||
# Set AWS_PROFILE | ||
$Env:AWS_PROFILE = $selectedProfile | ||
} |
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,17 @@ | ||
# Switch AWS Fusion region | ||
aws-fusion config-switch region | ||
if ($LASTEXITCODE -ne 0) { | ||
return | ||
} | ||
|
||
# Read the selected region | ||
$selectedRegion = Get-Content "$HOME\.aws\fusion\region" | ||
|
||
# Check if the selected region is empty | ||
if ([string]::IsNullOrWhiteSpace($selectedRegion)) { | ||
# Unset AWS_REGION as it matches the one in the current profile | ||
Remove-Item Env:AWS_REGION -ErrorAction SilentlyContinue | ||
} else { | ||
# Set AWS_REGION | ||
$Env:AWS_REGION = $selectedRegion | ||
} |
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