Skip to content

Commit 637d2eb

Browse files
committed
readd openssl fixes missing from PR
- give full path to openssl package hash - fix package download url
1 parent 661f3d9 commit 637d2eb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

utils/acquireOpenSSL.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ export const getOpenSSLPackageName = () => {
436436

437437
export const getOpenSSLPackagePath = () => path.join(import.meta.dirname, getOpenSSLPackageName());
438438

439-
const getOpenSSLPackageUrl = () => `${packageJson.binary.host}${getOpenSSLPackageName()}`;
439+
const getOpenSSLPackageUrl = () => {
440+
const hostUrl = new URL(packageJson.binary.host);
441+
hostUrl.pathname = getOpenSSLPackageName();
442+
return hostUrl.toString();
443+
};
440444

441445
const buildPackage = async () => {
442446
let resolve, reject;
@@ -462,7 +466,7 @@ const buildPackage = async () => {
462466
createWriteStream(getOpenSSLPackagePath())
463467
);
464468
const digest = await promise;
465-
await fs.writeFile(`${getOpenSSLPackageName()}.sha256`, digest);
469+
await fs.writeFile(`${getOpenSSLPackagePath()}.sha256`, digest);
466470
};
467471

468472
const acquireOpenSSL = async () => {

0 commit comments

Comments
 (0)