summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-10-06 13:41:42 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-10-06 13:41:42 +0200
commitbc9f0660cf5110ab2e517aac569931602ec83cff (patch)
tree4489bea5a604b1fb146b4be8db604dc4e4bb1340 /common
parentremove_known_hosts: fix shell variables (diff)
utils.sh local variables
Diffstat (limited to 'common')
-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