mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-19 05:12:49 +02:00
fix(aws): use return instead of exit to avoid killing the shell (#13811)
This commit is contained in:
parent
3f6f72010f
commit
ffa8487bc7
1 changed files with 2 additions and 2 deletions
|
|
@ -9,14 +9,14 @@ function agr() {
|
|||
# Update state file if enabled
|
||||
function _aws_update_state() {
|
||||
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
|
||||
test -d $(dirname ${AWS_STATE_FILE}) || exit 1
|
||||
test -d $(dirname ${AWS_STATE_FILE}) || return 1
|
||||
echo "${AWS_PROFILE} ${AWS_REGION}" > "${AWS_STATE_FILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
function _aws_clear_state() {
|
||||
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
|
||||
test -d $(dirname ${AWS_STATE_FILE}) || exit 1
|
||||
test -d $(dirname ${AWS_STATE_FILE}) || return 1
|
||||
echo -n > "${AWS_STATE_FILE}"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue