From 20a8d50084212bf0c2ab01ebbb89c87865df1478 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Tue, 14 Jul 2026 09:16:05 +0000 Subject: [PATCH] Fix git log SSH: split SHA and timestamp into separate calls to avoid shell quoting Co-Authored-By: Claude Sonnet 4.6 --- updater/src/index.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/updater/src/index.js b/updater/src/index.js index ac55d23..df492ed 100644 --- a/updater/src/index.js +++ b/updater/src/index.js @@ -144,17 +144,13 @@ async function refreshStatus(repo) { return null } - const [currentRaw, latest] = await Promise.all([ - sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H %cI', 'HEAD']), + const [[currentSha, currentTimestamp], latest] = await Promise.all([ + Promise.all([ + sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H', 'HEAD']), + sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%cI', 'HEAD']), + ]), getForgejoCommit(repo), ]) - - let currentSha = null, currentTimestamp = null - if (currentRaw && currentRaw.includes(' ')) { - const sp = currentRaw.indexOf(' ') - currentSha = currentRaw.slice(0, sp) - currentTimestamp = currentRaw.slice(sp + 1) - } const deployed = !!currentSha const entry = { repo,