From d62101f4c49bcf24682d816e5b22b9d79f06b95c Mon Sep 17 00:00:00 2001 From: Hans-Halverson Date: Wed, 5 Oct 2022 13:26:45 -0500 Subject: [PATCH] fix: fix broken resetAdHocDarwinSignature option (#9) * fix: fix broken resetAdHocDarwinSignature option * Add type annotation for numSentinels --- src/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ef20bb9..0d9e7bf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -150,14 +150,17 @@ export const flipFuses = async ( pathToElectron: string, fuseConfig: FuseConfig, ): Promise => { + 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}`); } @@ -178,4 +181,6 @@ export const flipFuses = async ( throw new Error(`Ad-hoc codesign failed with status: ${result.status}`); } } + + return numSentinels; };