"backend/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "bdc426a7748414740215e0f33e51987382d9e5df"
Commit dcffc895 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

aws: fix array assignment in asp function

Older zsh versions require this syntax change.
Fixes #8525
parent 05a38c8b
...@@ -10,7 +10,8 @@ function asp() { ...@@ -10,7 +10,8 @@ function asp() {
return return
fi fi
local available_profiles=($(aws_profiles)) local -a available_profiles
available_profiles=($(aws_profiles))
if [[ -z "${available_profiles[(r)$1]}" ]]; then if [[ -z "${available_profiles[(r)$1]}" ]]; then
echo "${fg[red]}Profile '$1' not found in '${AWS_CONFIG_FILE:-$HOME/.aws/config}'" >&2 echo "${fg[red]}Profile '$1' not found in '${AWS_CONFIG_FILE:-$HOME/.aws/config}'" >&2
echo "Available profiles: ${(j:, :)available_profiles:-no profiles found}${reset_color}" >&2 echo "Available profiles: ${(j:, :)available_profiles:-no profiles found}${reset_color}" >&2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment