Files
Odoo-Build/images/odoo/bin/remove-ssh-key
T
Janik von Rotz bdd83120b7 fix(task): ensure migration script continues on update-module failure
- Modify `migrate` function to prevent exit on `update-module` command failure
- Adjust `remove-ssh-key` script to improve SSH agent detection and cleanup
- Maintain compatibility with existing SSH key handling behavior
2025-11-24 13:50:34 +01:00

13 lines
418 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [[ -n "$GIT_SSH_PRIVATE_KEY" ]]; then
key_filename="${SSH_ID_ALGORITHM:=id_ed25519}"
log-entrypoint 'Remove SSH key from env var.'
if [[ -n "$SSH_AUTH_SOCK" ]] || [[ -n "$SSH_AGENT_PID" ]]; then
if [[ -f "$HOME/.ssh/$key_filename" ]]; then
ssh-add -d "$HOME/.ssh/$key_filename" 2>/dev/null || true
fi
fi
rm -f "$HOME/.ssh/$key_filename"
fi