Created
May 18, 2024 15:51
-
-
Save Moulick/34a333da526a1063465630ed91c6129c to your computer and use it in GitHub Desktop.
Script for making aws-sso-cli work in Github CodeSpaces
This file contains hidden or 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
#!/usr/bin/env bash | |
# This script was introduced to make aws-sso-cli compatible with GitHub Codespaces. | |
# GitHub Codespaces defines a $BROWSER env var that handles opening urls. | |
# https://github.com/synfinatic/aws-sso-cli/issues/816 | |
# If $BROWSER is not set then use 'open' on macos and 'xdg-open' on linux. | |
if [[ -z ${BROWSER+x} ]]; then | |
if [[ "$(uname)" == "Darwin" ]]; then | |
BROWSER=open | |
elif [[ "$(uname)" == "Linux" ]]; then | |
BROWSER=xdg-open | |
fi | |
fi | |
$BROWSER "$@" |
This file contains hidden or 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
UrlAction: exec | |
UrlExecCommand: | |
- ~/.aws-sso/browser-selector.sh | |
- "%s" | |
ConfigProfilesUrlAction: exec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment