Merge pull request #752 from olagrasli/patch-1

Update install-docker-agent.sh to handle log_error and calculated checksum new line
This commit is contained in:
rcourtman 2025-11-24 22:40:25 +00:00 committed by GitHub
commit 8175e36d60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,6 +38,10 @@ log_warn() {
printf '[WARN] %s\n' "$1" >&2 printf '[WARN] %s\n' "$1" >&2
} }
log_error() {
printf '[ERROR] %s\n' "$1" >&2
}
log_header() { log_header() {
printf '\n== %s ==\n' "$1" printf '\n== %s ==\n' "$1"
} }
@ -1715,7 +1719,7 @@ verify_agent_checksum() {
return 0 return 0
fi fi
if [[ "$FETCHED_CHECKSUM" != "$CALCULATED_CHECKSUM" ]]; then if [[ "$(echo "$FETCHED_CHECKSUM" | tr -d '\r\n')" != "$(echo "$CALCULATED_CHECKSUM" | tr -d '\r\n')" ]]; then
rm -f "$AGENT_PATH" rm -f "$AGENT_PATH"
log_error "Checksum mismatch. Expected $FETCHED_CHECKSUM but downloaded $CALCULATED_CHECKSUM" log_error "Checksum mismatch. Expected $FETCHED_CHECKSUM but downloaded $CALCULATED_CHECKSUM"
return 1 return 1