rumdl 0.1.44 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/rumdl +19 -14
- package/package.json +8 -8
package/bin/rumdl
CHANGED
|
@@ -254,18 +254,28 @@ function findBinary() {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
257
|
+
* Ensure the binary is executable, fixing permissions if needed.
|
|
258
|
+
* npm does not preserve file permissions when publishing packages,
|
|
259
|
+
* so binaries may need chmod +x after install.
|
|
258
260
|
*/
|
|
259
|
-
function
|
|
261
|
+
function ensureExecutable(binaryPath) {
|
|
262
|
+
if (process.platform === "win32") {
|
|
263
|
+
return; // Windows doesn't use Unix file permissions
|
|
264
|
+
}
|
|
265
|
+
|
|
260
266
|
try {
|
|
261
267
|
fs.accessSync(binaryPath, fs.constants.X_OK);
|
|
262
|
-
return true;
|
|
263
268
|
} catch {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
269
|
+
debug(`Binary not executable, fixing permissions: ${binaryPath}`);
|
|
270
|
+
try {
|
|
271
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
272
|
+
} catch (chmodErr) {
|
|
273
|
+
throw new Error(
|
|
274
|
+
`Binary found but not executable: ${binaryPath}\n` +
|
|
275
|
+
`Automatic chmod failed: ${chmodErr.message}\n` +
|
|
276
|
+
`Try manually: chmod +x "${binaryPath}"`
|
|
277
|
+
);
|
|
267
278
|
}
|
|
268
|
-
return false;
|
|
269
279
|
}
|
|
270
280
|
}
|
|
271
281
|
|
|
@@ -277,13 +287,8 @@ function main() {
|
|
|
277
287
|
const binaryPath = findBinary();
|
|
278
288
|
debug(`Using binary: ${binaryPath}`);
|
|
279
289
|
|
|
280
|
-
//
|
|
281
|
-
|
|
282
|
-
throw new Error(
|
|
283
|
-
`Binary found but not executable: ${binaryPath}\n` +
|
|
284
|
-
`Try: chmod +x "${binaryPath}"`
|
|
285
|
-
);
|
|
286
|
-
}
|
|
290
|
+
// Ensure the binary is executable (npm doesn't preserve file permissions)
|
|
291
|
+
ensureExecutable(binaryPath);
|
|
287
292
|
|
|
288
293
|
// Spawn the binary with all arguments
|
|
289
294
|
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rumdl",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"description": "A fast Markdown linter written in Rust",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"node": ">=18.0.0"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@rumdl/cli-darwin-x64": "0.1.
|
|
37
|
-
"@rumdl/cli-darwin-arm64": "0.1.
|
|
38
|
-
"@rumdl/cli-linux-x64": "0.1.
|
|
39
|
-
"@rumdl/cli-linux-arm64": "0.1.
|
|
40
|
-
"@rumdl/cli-linux-x64-musl": "0.1.
|
|
41
|
-
"@rumdl/cli-linux-arm64-musl": "0.1.
|
|
42
|
-
"@rumdl/cli-win32-x64": "0.1.
|
|
36
|
+
"@rumdl/cli-darwin-x64": "0.1.46",
|
|
37
|
+
"@rumdl/cli-darwin-arm64": "0.1.46",
|
|
38
|
+
"@rumdl/cli-linux-x64": "0.1.46",
|
|
39
|
+
"@rumdl/cli-linux-arm64": "0.1.46",
|
|
40
|
+
"@rumdl/cli-linux-x64-musl": "0.1.46",
|
|
41
|
+
"@rumdl/cli-linux-arm64-musl": "0.1.46",
|
|
42
|
+
"@rumdl/cli-win32-x64": "0.1.46"
|
|
43
43
|
}
|
|
44
44
|
}
|