Fix git log SSH: split SHA and timestamp into separate calls to avoid shell quoting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e66164cdb7
commit
20a8d50084
1 changed files with 5 additions and 9 deletions
|
|
@ -144,17 +144,13 @@ async function refreshStatus(repo) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const [currentRaw, latest] = await Promise.all([
|
const [[currentSha, currentTimestamp], latest] = await Promise.all([
|
||||||
sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H %cI', 'HEAD']),
|
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),
|
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 deployed = !!currentSha
|
||||||
const entry = {
|
const entry = {
|
||||||
repo,
|
repo,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue