Fix git log format — pipe in --format broken by remote shell, use space
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
66355bd698
commit
e66164cdb7
1 changed files with 5 additions and 3 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue