Skip to content

Commit

Permalink
Merge pull request #34 from victorsoares96/fix/skip-gs-download-env-n…
Browse files Browse the repository at this point in the history
…ot-work

🩹 fix: skip gs binary download env not working
  • Loading branch information
victorsoares96 authored May 25, 2023
2 parents f4aa5a9 + 88adb68 commit 6f9e848
Show file tree
Hide file tree
Showing 3 changed files with 678 additions and 670 deletions.
6 changes: 4 additions & 2 deletions install.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../../.env') });

const os = require('os');
const fs = require('fs');
const path = require('path');
const childProcess = require('child_process');
const util = require('util');

const exec = util.promisify(childProcess.exec);

(async () => {
if (fs.existsSync(path.resolve(__dirname, '../dist')) && !process.env.SKIP_BINARY_DOWNLOAD) {
if (fs.existsSync(path.resolve(__dirname, '../dist')) && !process.env.SKIP_GS_BINARY_DOWNLOAD) {
const fetchBinaries = require('./fetch-binaries');
const gsPath = path.resolve(__dirname, '../bin/gs');

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "compress-pdf",
"version": "0.3.5",
"version": "0.3.6",
"templateVersion": "1.3.0",
"description": "An compress pdf library using ghostscript",
"main": "dist/index.js",
Expand Down Expand Up @@ -49,6 +49,7 @@
},
"homepage": "https://github.com/victorsoares96/compress-pdf#readme",
"dependencies": {
"dotenv": "16.0.3",
"lodash": "4.17.21",
"request": "2.88.2",
"unzipper": "0.10.11"
Expand Down
Loading

0 comments on commit 6f9e848

Please sign in to comment.