Skip to content

Commit

Permalink
Fixes types on publish
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Oct 15, 2024
1 parent 99eff65 commit a4cd223
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion daemon/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ const resolveConflictsRecursively = async (wip: number = 50) => {
}

await git.rebase({ "--continue": null });
} catch (error) {
} catch (_error) {
const error = _error as { message?: string };
// We should never enter this `if` in normal circumstances
if (!error.message?.includes("CONFLICT")) {
console.error(error);
Expand Down
3 changes: 2 additions & 1 deletion daemon/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export const watchMeta = async () => {

broadcast({ type: "meta-info", detail: withExtraParams });
dispatchWorkerState("ready");
} catch (error) {
} catch (_error) {
const error = _error as { status?: number };
// in case of timeout, retry without updating the worker state
// to avoid false alarming down state
if (error.status === 408) {
Expand Down
3 changes: 2 additions & 1 deletion daemon/workers/portpool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class PortPool implements PortPool {
const server = Deno.listen(options);
server.close();
return { valid: true, port };
} catch (e) {
} catch (_err) {
const e = _err as { name?: string };
if (e.name !== "AddrInUse") throw e;
else return { valid: false, port };
}
Expand Down

0 comments on commit a4cd223

Please sign in to comment.