Skip to content

Commit 47c0921

Browse files
committed
strip asar integrity if it contains a runtime-generated macho
1 parent a0aef44 commit 47c0921

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

test/__snapshots__/index.spec.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ exports[`makeUniversalApp no asar mode different app dirs with different macho f
694694
"Contents/Info.plist": {
695695
"Resources/app.asar": {
696696
"algorithm": "SHA256",
697-
"hash": "27433ee3e34b3b0dabb29d18d40646126e80c56dbce8c4bb2adef7278b5a46c0",
697+
"hash": "<stripped>",
698698
},
699699
},
700700
}
@@ -774,7 +774,7 @@ exports[`makeUniversalApp no asar mode different app dirs with universal macho f
774774
"Contents/Info.plist": {
775775
"Resources/app.asar": {
776776
"algorithm": "SHA256",
777-
"hash": "27433ee3e34b3b0dabb29d18d40646126e80c56dbce8c4bb2adef7278b5a46c0",
777+
"hash": "<stripped>",
778778
},
779779
},
780780
}
@@ -1004,7 +1004,7 @@ exports[`makeUniversalApp works for lipo binary resources 4`] = `
10041004
"Contents/Info.plist": {
10051005
"Resources/app.asar": {
10061006
"algorithm": "SHA256",
1007-
"hash": "0e96b4a283b93002688c960570da3407cd58913ab75b196e7c9da910b65d5b9f",
1007+
"hash": "<stripped>",
10081008
},
10091009
},
10101010
}

test/util.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ export const verifyApp = async (appPath: string, containsRuntimeGeneratedMacho =
6767
for (let i = 0; i < integrity.length; i++) {
6868
const relativePath = infoPlists[i];
6969
const asarIntegrity = integrity[i];
70-
integrityMap[relativePath] = asarIntegrity;
70+
integrityMap[relativePath] = removeUnstableProperties(
71+
asarIntegrity,
72+
containsRuntimeGeneratedMacho,
73+
);
7174
}
7275
expect(integrityMap).toMatchSnapshot();
7376
};

0 commit comments

Comments
 (0)