Skip to content

Commit 3ee0c1a

Browse files
committed
Update Aikido hook snippet formatting for improved readability
1 parent 8c1f6d0 commit 3ee0c1a

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/aikido-precommit/install.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ if [ "$SETUP_GLOBAL_HOOKS" = "true" ]; then
117117
# Define the Aikido hook snippet
118118
AIKIDO_HOOK_START="# --- Aikido local scanner ---"
119119
AIKIDO_HOOK_END="# --- End Aikido local scanner ---"
120-
AIKIDO_HOOK_SNIPPET="${AIKIDO_HOOK_START}
121-
[ -x \"${INSTALL_DIR}/${BINARY_NAME}\" ] || { echo \"Aikido local scanner not found at ${INSTALL_DIR}/${BINARY_NAME}\"; exit 1; }
122-
REPO_ROOT=\"\$(git rev-parse --show-toplevel)\"
123-
\"${INSTALL_DIR}/${BINARY_NAME}\" pre-commit-scan \"\$REPO_ROOT\"
124-
${AIKIDO_HOOK_END}"
120+
AIKIDO_HOOK_SNIPPET="""
121+
${AIKIDO_HOOK_START}
122+
[ -x \"${INSTALL_DIR}/${BINARY_NAME}\" ] || { echo \"Aikido local scanner not found at ${INSTALL_DIR}/${BINARY_NAME}\"; exit 1; }
123+
REPO_ROOT=\"\$(git rev-parse --show-toplevel)\"
124+
\"${INSTALL_DIR}/${BINARY_NAME}\" pre-commit-scan \"\$REPO_ROOT\"
125+
${AIKIDO_HOOK_END}
126+
"""
125127

126128
# Check if hook file exists and if Aikido snippet is already present
127129
if [ -f "$PRECOMMIT_HOOK" ]; then

0 commit comments

Comments
 (0)