fix: address notifier onboarding review (#1958)
This commit is contained in:
parent
d5f3e1963f
commit
7f566a331b
|
|
@ -176,7 +176,7 @@ async function ensureDefaultStartupNotifiers(
|
|||
dashboardUrl,
|
||||
desktopMode,
|
||||
});
|
||||
return changed ? loadConfig(config.configPath) : config;
|
||||
return changed ? loadConfig(targetConfigPath) : config;
|
||||
}
|
||||
|
||||
function readProjectBehaviorConfig(projectPath: string): LocalProjectConfig {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ import { makeEvent } from "./helpers/event-factory.js";
|
|||
vi.mock("node:child_process", () => ({
|
||||
execFile: vi.fn(),
|
||||
execFileSync: vi.fn(() => {
|
||||
throw new Error("not found");
|
||||
const error = new Error("not found") as NodeJS.ErrnoException;
|
||||
error.code = "ENOENT";
|
||||
throw error;
|
||||
}),
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -383,8 +383,8 @@ function detectTerminalNotifier(): boolean {
|
|||
try {
|
||||
execFileSync("terminal-notifier", ["--version"], { stdio: "ignore", windowsHide: true });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
} catch (error) {
|
||||
return (error as NodeJS.ErrnoException).code !== "ENOENT";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue