fix(rust-binary-locator): auto-fix missing execute permission for located Rust binaries
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-02-12 - 1.2.1 - fix(rust-binary-locator)
|
||||
auto-fix missing execute permission for located Rust binaries
|
||||
|
||||
- If a located binary exists but lacks the execute bit, attempt to chmod it to 0o755 and treat it as executable.
|
||||
- Logs an info message when the auto-fix is applied: 'Auto-fixed missing execute permission on: <filePath>'.
|
||||
- Addresses cases where npm/pnpm installs remove the execute permission from bundled binaries.
|
||||
|
||||
## 2026-02-11 - 1.2.0 - feat(rustbridge)
|
||||
add streaming responses and robust large-payload/backpressure handling to RustBridge
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartrust',
|
||||
version: '1.2.0',
|
||||
version: '1.2.1',
|
||||
description: 'a bridge between JS engines and rust'
|
||||
}
|
||||
|
||||
@@ -123,10 +123,19 @@ export class RustBinaryLocator {
|
||||
try {
|
||||
await plugins.fs.promises.access(filePath, plugins.fs.constants.X_OK);
|
||||
return true;
|
||||
} catch {
|
||||
// File may exist but lack execute bit (common after npm/pnpm install).
|
||||
// Try to make it executable.
|
||||
try {
|
||||
await plugins.fs.promises.access(filePath, plugins.fs.constants.F_OK);
|
||||
await plugins.fs.promises.chmod(filePath, 0o755);
|
||||
this.logger.log('info', `Auto-fixed missing execute permission on: ${filePath}`);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async findInPath(binaryName: string): Promise<string | null> {
|
||||
const pathDirs = (process.env.PATH || '').split(plugins.path.delimiter);
|
||||
|
||||
Reference in New Issue
Block a user