Skip to content

Commit

Permalink
fix: fix broken resetAdHocDarwinSignature option (#9)
Browse files Browse the repository at this point in the history
* fix: fix broken resetAdHocDarwinSignature option

* Add type annotation for numSentinels
  • Loading branch information
Hans-Halverson authored Oct 5, 2022
1 parent b9cf213 commit d62101f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,17 @@ export const flipFuses = async (
pathToElectron: string,
fuseConfig: FuseConfig,
): Promise<number> => {
let numSentinels: number;

switch (fuseConfig.version) {
case FuseVersion.V1:
return await setFuseWire(
numSentinels = await setFuseWire(
pathToElectron,
fuseConfig.version,
buildFuseV1Wire.bind(null, fuseConfig),
(i) => FuseV1Options[i],
);
break;
default:
throw new Error(`Unsupported fuse version number: ${fuseConfig.version}`);
}
Expand All @@ -178,4 +181,6 @@ export const flipFuses = async (
throw new Error(`Ad-hoc codesign failed with status: ${result.status}`);
}
}

return numSentinels;
};

0 comments on commit d62101f

Please sign in to comment.