Skip to content

Commit

Permalink
Fix unbound vars issue when migrating to 2.0
Browse files Browse the repository at this point in the history
[Bug Fixes]

* Resolve unbound variable issue when migrating from v1.10.x to 2.0.x
  that was introduced in v2.0.5
  • Loading branch information
dennisjbell committed Nov 30, 2023
1 parent 3f56346 commit 7e30d57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/migrate-to-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
migrate_credentials_to_credhub() {
vault_prefix=${GENESIS_SECRETS_MOUNT}${GENESIS_SECRETS_SLUG}
vault_paths=$(safe paths --keys ${vault_prefix} | jq -c -R -s 'split("\n") | map(select(length > 0))')
[[ -n "$GENESIS_KIT_PATH" ]] || export GENESIS_KIT_PATH="$PWD"
[[ -n "$GENESIS_BOSH_COMMAND" ]] || export GENESIS_BOSH_COMMAND=`type -P bosh bosh2 bosh-cli | head -n1`
[[ -n "${GENESIS_KIT_PATH:-''}" ]] || export GENESIS_KIT_PATH="$PWD"
[[ -n "${GENESIS_BOSH_COMMAND:-''}" ]] || export GENESIS_BOSH_COMMAND=`type -P bosh bosh2 bosh-cli | head -n1`
credhub import -f <( \
$GENESIS_BOSH_COMMAND int "${GENESIS_KIT_PATH}/hooks/support/vault-credhub-mapping.yml" \
-v=credhub_prefix="$GENESIS_CREDHUB_ROOT" -v=vault_prefix=${vault_prefix#/} | spruce json \
Expand Down

0 comments on commit 7e30d57

Please sign in to comment.