fix(rust-binary-locator): auto-fix missing execute permission for located Rust binaries

This commit is contained in:
2026-02-12 21:25:11 +00:00
parent 35971a395f
commit b7e3e30ce5
3 changed files with 18 additions and 2 deletions

View File

@@ -124,7 +124,16 @@ export class RustBinaryLocator {
await plugins.fs.promises.access(filePath, plugins.fs.constants.X_OK);
return true;
} catch {
return false;
// 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;
}
}
}