fix(rust-binary-locator): auto-fix missing execute permission for located Rust binaries
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user