- 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
13 lines
418 B
Bash
Executable File
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 |