Skip to content

Commit ab88ee6

Browse files
authored
Merge pull request #54 from paprika-mah/fix/fail-get-region
FIX: failed to ap-northeast-1 using Mac
2 parents f9f8a1d + 5fb3d60 commit ab88ee6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

check-ecs-exec.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fi
125125
printf "${COLOR_DEFAULT} AWS CLI | ${COLOR_GREEN}OK ${COLOR_DEFAULT}($(which "${AWS_CLI_BIN}"))\n"
126126

127127
# Find AWS region
128-
REGION=$(${AWS_CLI_BIN} configure get region | sed -e 's/\r//g' || echo "")
128+
REGION=$(${AWS_CLI_BIN} configure get region | tr -d "\r" || echo "")
129129
export AWS_REGION=${AWS_REGION:-$REGION}
130130
# Check region configuration in "source_profile" if the user uses MFA configurations
131131
source_profile=$(${AWS_CLI_BIN} configure get source_profile || echo "")
@@ -209,7 +209,7 @@ Please update the AWS CLI and try again?\n\
209209
For v1: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html${COLOR_DEFAULT}\n"
210210
exit 1
211211
fi
212-
awsCliVersion=$(${AWS_CLI_BIN} --version 2>&1 | sed -e 's/\r//g')
212+
awsCliVersion=$(${AWS_CLI_BIN} --version 2>&1 | tr -d "\r")
213213
printf "${COLOR_DEFAULT} AWS CLI Version | ${COLOR_GREEN}OK ${COLOR_DEFAULT}(${awsCliVersion})\n"
214214

215215
# Check whether the Session Manager plugin exists

0 commit comments

Comments
 (0)