From 576d3173cd6e30138cac4d0d915f6dc5c3a149c3 Mon Sep 17 00:00:00 2001 From: Remco Koopmans Date: Wed, 14 Feb 2024 12:58:56 +0100 Subject: [PATCH] Construct cert bundle path using path.join() --- src/tinify/Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tinify/Client.ts b/src/tinify/Client.ts index d6aa47a..370a93c 100644 --- a/src/tinify/Client.ts +++ b/src/tinify/Client.ts @@ -8,7 +8,7 @@ import {version} from "../../package.json" import tinify from "../tinify" const boundaries = /-----BEGIN CERTIFICATE-----[\s\S]+?-----END CERTIFICATE-----\n/g -const data = fs.readFileSync(`${__dirname}/../data/cacert.pem`).toString() +const data = fs.readFileSync(path.join(__dirname, '..', 'data', 'cacert.pem')).toString(); interface ClientOptions { ca: RegExpMatchArray