diff --git a/package.json b/package.json index 8c77d80..0a76f56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aminya/minijson", - "version": "1.0.1", + "version": "1.0.2", "description": "Minify JSON files blazing fast! Supports Comments. Uses D, C, and AVX2 and SSE4_1 SIMD", "homepage": "https://github.com/aminya/minijson", "license": "MIT", diff --git a/src/node/lib.ts b/src/node/lib.ts index 667fc50..c8553d6 100644 --- a/src/node/lib.ts +++ b/src/node/lib.ts @@ -1,4 +1,5 @@ import { execFile } from "child_process" +import { chmodSync } from "fs" import { readFile, writeFile } from "fs/promises" import { join } from "path" @@ -64,6 +65,11 @@ const binName = `minijson${exeExtention}` const minijsonBin = join(__dirname, `${process.platform}-${process.arch}`, binName) +// chmod as executable on non-windows +if (process.platform !== "win32") { + chmodSync(minijsonBin, 0o755) +} + /** * Spawn minijson with the given arguments *