Refactor Mac installer progress messages for clarity; simplify progress percentage calculation and update installation prompt message.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-06-21 18:38:23 +01:00
parent 08890bd5bf
commit 71fe6e3462

View File

@ -188,10 +188,7 @@ const parseMacInstallerProgress = (output) => {
} else if (line.startsWith('installer:%')) {
const value = Number.parseFloat(line.slice('installer:%'.length))
if (Number.isFinite(value)) {
percent = Math.min(
100,
Math.round(value <= 1 ? value * 100 : value)
)
percent = Math.min(100, Math.round(value <= 1 ? value * 100 : value))
}
} else if (
line.startsWith('installer: ') &&
@ -259,8 +256,7 @@ const launchMacInstaller = (app, installerPath, webContents) => {
sendProgress(webContents, {
phase: 'installing',
percent: 0,
message:
'Installing update. Enter your Mac password when prompted, then Farm Control will restart automatically.'
message: 'Enter your Mac password when prompted.'
})
app.focus({ steal: true })