Skip to content

Commit ca46bd6

Browse files
committed
scripts: fix playground vote script to sops decrypt with bash array args
1 parent 211739f commit ca46bd6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/playground/vote-with-pools-and-drep.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ if [ -z "${DISABLE_DREP_VOTE:-}" ]; then
7474
WITNESS_OVERRIDE=$((WITNESS_OVERRIDE + 1))
7575
fi
7676

77+
SIGN_TX_ARGS+=("--signing-key-file" "<(just sops-decrypt-binary \"secrets/envs/${ENV}/utxo-keys/rich-utxo.skey\")")
7778
RICH_ADDR=$(just sops-decrypt-binary "secrets/envs/${ENV}/utxo-keys/rich-utxo.addr")
7879

7980
TXIN=$(cardano-cli latest query utxo \
@@ -94,9 +95,11 @@ cardano-cli latest transaction build \
9495
--out-file vote-tx.raw
9596

9697
# Sign the transaction:
97-
cardano-cli latest transaction sign \
98+
# shellcheck disable=SC1083,SC2116
99+
SIGNING_CMD=$(echo cardano-cli latest transaction sign \
98100
--tx-body-file vote-tx.raw \
99-
--signing-key-file <(just sops-decrypt-binary "secrets/envs/${ENV}/utxo-keys/rich-utxo.skey") \
100-
"${SIGN_TX_ARGS[@]}" \
101-
--testnet-magic "$TESTNET_MAGIC" \
101+
"${SIGN_TX_ARGS[*]}" \
102+
--testnet-magic \"\$TESTNET_MAGIC\" \
102103
--out-file vote-tx.signed
104+
)
105+
eval "$SIGNING_CMD"

0 commit comments

Comments
 (0)