Skip to content

Commit f9e4463

Browse files
Rhinomcdclaude
andcommitted
fix(desktop): report a failed helper update as a setup step
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 24dd9a6 commit f9e4463

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎apps/desktop/src/snapShot/HyprlandSnapShot.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ export async function captureHyprlandWindow(
170170
const setup = new HyprlandCaptureSetup(paths);
171171
let state = await setup.state();
172172
if (state.status === "update-required") {
173-
await setup.perform("install-hyprland-helper");
173+
await setup.perform("install-hyprland-helper").catch((cause: unknown) => {
174+
throw new CaptureSetupRequiredError(state.message, { cause });
175+
});
174176
state = await setup.state();
175177
}
176178
if (state.status !== "ready") throw new CaptureSetupRequiredError(state.message);

‎apps/desktop/src/snapShot/linuxCaptureSession.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { nativeImage } from "electron";
99
export const HYPRLAND_CAPTURE_ACTION = "capture-window";
1010

1111
export class CaptureSetupRequiredError extends Error {
12-
constructor(state: string) {
13-
super(`${state} Open Settings → SnapShots to continue setup.`);
12+
constructor(state: string, options?: ErrorOptions) {
13+
super(`${state} Open Settings → SnapShots to continue setup.`, options);
1414
}
1515
}
1616
export const NIRI_CAPTURE_PATH = "/com/t3tools/SnapShot";

0 commit comments

Comments
 (0)