diff --git a/updater/src/index.js b/updater/src/index.js index 5c1c194..ac55d23 100644 --- a/updater/src/index.js +++ b/updater/src/index.js @@ -145,13 +145,15 @@ async function refreshStatus(repo) { } const [currentRaw, latest] = await Promise.all([ - sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H|%cI', 'HEAD']), + sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H %cI', 'HEAD']), getForgejoCommit(repo), ]) let currentSha = null, currentTimestamp = null - if (currentRaw && currentRaw.includes('|')) { - ;[currentSha, currentTimestamp] = currentRaw.split('|') + if (currentRaw && currentRaw.includes(' ')) { + const sp = currentRaw.indexOf(' ') + currentSha = currentRaw.slice(0, sp) + currentTimestamp = currentRaw.slice(sp + 1) } const deployed = !!currentSha const entry = {