From b842e5e63e90918356b947b3090ceeec549f48b9 Mon Sep 17 00:00:00 2001 From: Morningstar202604 <2516285782@qq.com> Date: Sat, 5 Sep 2026 06:25:14 +0800 Subject: [PATCH] fix(aws): send asr() error message to stderr and reset terminal color (#14027) asp() already writes its "profile not found" error to stderr and ends with ${reset_color}; asr() printed its region error to stdout without a reset, leaving the terminal red and mixing diagnostics into piped output. Mirror asp() so both selection helpers behave the same. Refs #13949 --- plugins/aws/aws.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index f2c7765ff..c78531db1 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -69,7 +69,7 @@ function asr() { local -a available_regions available_regions=($(aws_regions)) if [[ -z "${available_regions[(r)$1]}" ]]; then - echo "${fg[red]}Available regions: \n$(aws_regions)" + echo "${fg[red]}Available regions: \n$(aws_regions)${reset_color}" >&2 return 1 fi