Skip to content

Commit

Permalink
Construct cert bundle path using path.join()
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoopmans committed Feb 14, 2024
1 parent 95e5288 commit 576d317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tinify/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (14, ubuntu-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (14, macOS-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (14, windows-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (16, ubuntu-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (16, macOS-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (16, windows-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (18, ubuntu-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (18, macOS-latest)

Cannot find name 'path'.

Check failure on line 11 in src/tinify/Client.ts

View workflow job for this annotation

GitHub Actions / Unit_tests (18, windows-latest)

Cannot find name 'path'.

interface ClientOptions {
ca: RegExpMatchArray
Expand Down

0 comments on commit 576d317

Please sign in to comment.