summaryrefslogtreecommitdiff
path: root/common/utils.sh
diff options
context:
space:
mode:
Diffstat (limited to 'common/utils.sh')
-rw-r--r--common/utils.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/utils.sh b/common/utils.sh
index d6795d21..c21d9079 100644
--- a/common/utils.sh
+++ b/common/utils.sh
@@ -91,6 +91,7 @@ vault_environment__activate() {
return 1
fi
+ local e=""
for e in $(vault_environment__get); do
if [ "$1" = "$e" ]; then
print_info "environment '$1' is already active"
@@ -98,7 +99,7 @@ vault_environment__activate() {
fi
done
- err_out=$(("gpg/get-vault-pass-$1" > /dev/null) 2>&1)
+ local err_out=$(("gpg/get-vault-pass-$1" > /dev/null) 2>&1)
if [ -n "$err_out" ]; then
print_error "failed to activate environment: '$1' .. reading passphrase from 'gpg/get-vault-pass-$1' returned an error"
return 1
@@ -114,14 +115,14 @@ vault_environment__activate() {
}
vault_environment__deactivate() {
- local new_list
if [ -z "$1" ]; then
print_error "please specify an environment"
return 2
fi
- new_list=""
+ local new_list=""
+ local e=""
for e in $(vault_environment__get); do
if [ "$1" != "$e" ]; then
if [ -z "$new_list" ]; then