be0dfaad6bab26060abf7d775f89ef9a38fd20ee
- Author
- kapil971390 <kapil69265@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(aws): quote vars to support spaces (#13868)
Diff
1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
2index 677bf3236f49d1f788ca9c9d88e88241bbddefc9..f2c7765ff8d56f0b32051c9e34ea7e361e95c8f6 100644
3--- a/plugins/aws/aws.plugin.zsh
4+++ b/plugins/aws/aws.plugin.zsh
5@@ -9,14 +9,14 @@ function agr() {
6 # Update state file if enabled
7 function _aws_update_state() {
8 if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
9- test -d $(dirname ${AWS_STATE_FILE}) || return 1
10+ test -d "$(dirname "${AWS_STATE_FILE}")" || return 1
11 echo "${AWS_PROFILE} ${AWS_REGION}" > "${AWS_STATE_FILE}"
12 fi
13 }
14
15 function _aws_clear_state() {
16 if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
17- test -d $(dirname ${AWS_STATE_FILE}) || return 1
18+ test -d "$(dirname "${AWS_STATE_FILE}")" || return 1
19 echo -n > "${AWS_STATE_FILE}"
20 fi
21 }