fix: bootstrap registry on first workspace list
This commit is contained in:
@@ -155,6 +155,12 @@ export class WorkspaceRegistry {
|
||||
}
|
||||
|
||||
async list(): Promise<WorkspaceRevision[]> {
|
||||
const active = await this.tryActiveState();
|
||||
if (active) return active.revisions;
|
||||
// A clean installation has no active snapshot until the first registry operation. Keep
|
||||
// this lazy so health/startup remain available when Git is temporarily unreachable, while
|
||||
// still refusing corrupted existing state (tryActiveState throws instead of returning none).
|
||||
await this.bootstrap();
|
||||
return (await this.activeState()).revisions;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user