mdat-plugin-cli-help 1.0.3 → 1.0.4
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/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15339,10 +15339,10 @@ const pathExtensions = isWindows ? new Set(process.env.PATHEXT?.split(";").map((
|
|
|
15339
15339
|
/**
|
|
15340
15340
|
* Check if a file is executable (async).
|
|
15341
15341
|
*/
|
|
15342
|
-
async function isExecutable(filePath) {
|
|
15342
|
+
async function isExecutable(filePath, strictExtensions = false) {
|
|
15343
15343
|
try {
|
|
15344
15344
|
await fs.access(filePath, fs.constants.X_OK);
|
|
15345
|
-
return isWindows ? pathExtensions.has(path.extname(filePath).toLowerCase()) : true;
|
|
15345
|
+
return strictExtensions && isWindows ? pathExtensions.has(path.extname(filePath).toLowerCase()) : true;
|
|
15346
15346
|
} catch {
|
|
15347
15347
|
return false;
|
|
15348
15348
|
}
|