We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f593f4c commit 5ec99feCopy full SHA for 5ec99fe
app/buck2_forkserver/src/run.rs
@@ -353,7 +353,20 @@ pub fn maybe_absolutize_exe<'a>(
353
354
let abs = spawned_process_cwd.join(exe);
355
if fs_util::try_exists(&abs).context("Error absolute-izing executable")? {
356
- return Ok(abs.into_path_buf().into());
+ let metadata = fs::metadata(&abs).context("Error getting metadata for path")?;
357
+ if metadata.is_file() {
358
+ #[cfg(unix)]
359
+ {
360
+ use std::os::unix::fs::PermissionsExt;
361
+ if metadata.permissions().mode() & 0o111 != 0 {
362
+ return Ok(abs.into_path_buf().into());
363
+ }
364
365
+ #[cfg(not(unix))]
366
367
368
369
370
}
371
372
Ok(exe.into())
0 commit comments