This commit is contained in:
Rodrigo Uroz 2026-01-30 10:39:12 -03:00 committed by GitHub
commit 25ab3438fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -678,6 +678,14 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
// Restore dist/control-ui/ to committed state to prevent dirty repo after update // Restore dist/control-ui/ to committed state to prevent dirty repo after update
// (ui:build regenerates assets with new hashes, which would block future updates) // (ui:build regenerates assets with new hashes, which would block future updates)
// Only attempt if the directory is tracked by git (older checkouts may still track it)
const lsFilesResult = await runCommand(
["git", "-C", gitRoot, "ls-files", "--error-unmatch", "dist/control-ui/"],
{ cwd: gitRoot, timeoutMs },
).catch(() => null);
const controlUiTracked = lsFilesResult?.code === 0;
if (controlUiTracked) {
const restoreUiStep = await runStep( const restoreUiStep = await runStep(
step( step(
"restore control-ui", "restore control-ui",
@ -686,6 +694,7 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
), ),
); );
steps.push(restoreUiStep); steps.push(restoreUiStep);
}
const doctorStep = await runStep( const doctorStep = await runStep(
step( step(