diff --git a/bin/update_sops.sh b/bin/update_sops.sh index 718c136..645b7fa 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -64,9 +64,9 @@ EOM } # UPDATE SOPS CONFIG -pushd "${keyfiles_dir}" +pushd "${keyfiles_dir}" > /dev/null 2>&1 (fn_update_sops_config) > "${sops_config}" -popd +popd > /dev/null 2>&1 # VERIFY fn_verify_sops_config(){ @@ -82,8 +82,9 @@ fn_verify_sops_config(){ GPG_TTY=$(tty) sops -d "${sops_enc_file}" } if [[ "${secrets_file}" != "0" ]]; then - pushd "${sops_config_dir}" + pushd "${sops_config_dir}" > /dev/null 2>&1 fn_verify_sops_config "${secrets_file}" + popd > /dev/null 2>&1 echo "# SUCESS: all users with keys in this dir should have functional keys" else diff --git a/example/cmd_sops.sh b/example/cmd_sops.sh index 10c5c99..d0286ed 100755 --- a/example/cmd_sops.sh +++ b/example/cmd_sops.sh @@ -6,4 +6,5 @@ cd "$( dirname "${BASH_SOURCE[0]}")/.." # ./bin/update_sops.sh "${curdir}" "${PWD}"/ +set -x ./bin/update_sops.sh "${curdir}" "${PWD}"/ "${curdir}/mock_secrets.yaml"