Skip to content

Commit

Permalink
[Issue #198] πŸ› correctly quote binary path
Browse files Browse the repository at this point in the history
  • Loading branch information
derwentx committed Sep 19, 2020
1 parent 9458eee commit e299a2b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,12 @@ run() {

cat >"$REPO_HOOK_TARGET" <<EOF
#!/bin/bash
[[ -n "\${TALISMAN_DEBUG}" ]] && TALISMAN_DEBUG_OPTS="-d"
CMD="${PWD}/${TALISMAN_BIN_TARGET} \${TALISMAN_DEBUG_OPTS} --githook ${HOOK_NAME}"
TALISMAN_OPTS="--githook ${HOOK_NAME}"
[[ -n "\${TALISMAN_DEBUG}" ]] && TALISMAN_OPTS="-d \${TALISMAN_OPTS}"
TALISMAN_BIN="${PWD}/${TALISMAN_BIN_TARGET}"
[[ -n "\${TALISMAN_DEBUG}" ]] && echo "ARGS are \$@"
[[ -n "\${TALISMAN_DEBUG}" ]] && echo "Executing: \${CMD}"
\${CMD}
[[ -n "\${TALISMAN_DEBUG}" ]] && echo "Executing: \${TALISMAN_BIN} \${TALISMAN_OPTS}"
"\$TALISMAN_BIN" \$TALISMAN_OPTS
EOF
chmod +x "$REPO_HOOK_TARGET"

Expand Down

0 comments on commit e299a2b

Please sign in to comment.