浏览代码

aws: fix array assignment in asp function

Older zsh versions require this syntax change.
Fixes #8525
Marc Cornellà 4 年之前
父节点
当前提交
dcffc89580
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      plugins/aws/aws.plugin.zsh

+ 2 - 1
plugins/aws/aws.plugin.zsh

@@ -10,7 +10,8 @@ function asp() {
     return
   fi
 
-  local available_profiles=($(aws_profiles))
+  local -a available_profiles
+  available_profiles=($(aws_profiles))
   if [[ -z "${available_profiles[(r)$1]}" ]]; then
     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