fix(update): write the agent version sidecar with a real newline

printf '%s\\n' emitted the literal characters backslash-n, which
archie-update-check's release-version check rejects, so every managed-agent
update left the installed agent version reported as unknown.
This commit is contained in:
sam committed 2026-09-18 23:14:34 +10:00
1 parent b1ec7f3ded
commit 18bbd699c1
2 files changed
+22 -1

No files matched your search

+1 -1
View File
@@ -248,7 +248,7 @@ if [[ ",$components," == *,agent,* ]]; then
# Only record a version after the image build succeeds. Write beside the
# state atomically so the check never observes a partial version.
version_tmp="$(mktemp "$AGENT_VERSION_FILE.tmp.XXXXXX")"
printf '%s\\n' "$RT" > "$version_tmp"
printf '%s\n' "$RT" > "$version_tmp"
chmod 600 "$version_tmp"
mv -f "$version_tmp" "$AGENT_VERSION_FILE"
fi