Enhance isInstallComplete function in AppUpdateProgress to recognize additional completion messages, including 'successful' and 'restarting', improving accuracy of installation status detection during updates.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
e0b409434d
commit
8677691da3
@ -72,11 +72,17 @@ const getDownloadStageStatus = (phase, isError) => {
|
||||
return 'pending'
|
||||
}
|
||||
|
||||
const isInstallComplete = (phase, message) =>
|
||||
phase === 'installing' &&
|
||||
String(message || '')
|
||||
.toLowerCase()
|
||||
.includes('complete')
|
||||
const isInstallComplete = (phase, message) => {
|
||||
if (phase !== 'installing') return false
|
||||
|
||||
const normalized = String(message || '').toLowerCase()
|
||||
|
||||
return (
|
||||
normalized.includes('complete') ||
|
||||
normalized.includes('successful') ||
|
||||
normalized.includes('restarting')
|
||||
)
|
||||
}
|
||||
|
||||
const getInstallStageStatus = (phase, isError, message) => {
|
||||
if (isError && ['downloaded', 'installing'].includes(phase)) return 'error'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user