diff --git a/bin/docker-credential-vault b/bin/docker-credential-vault index 3921e0e..5dddcba 100755 --- a/bin/docker-credential-vault +++ b/bin/docker-credential-vault @@ -19,7 +19,7 @@ set -euo pipefail config="${HOME}/.config/docker-credential-vault" req_cmds=(jq md5sum vault) -NO_LOG=1 +: ${NO_LOG:=1} PREFIX=secret/docker-credential [[ -f $config ]] && source "${config}" || true @@ -35,7 +35,7 @@ function get() { local hostname="$(cat -s)" # Missing newline at the end, read does not work log "Retrieving credential for ${hostname} if exists..." - vault read -field=data -format=json "${PREFIX}/$(hash_hostname "${hostname}")" + vault read -field=data -format=json "${PREFIX}/$(hash_hostname "${hostname}")" 2>/dev/null || echo "{}" } function erase() {