use crate::error::Result;
use std::fs;
use std::path::Path;
#[cfg(unix)]
pub fn make_executable(path: &Path) -> Result<()> {
use std::os::unix::fs::PermissionsExt;
let mut perms = fs::metadata(path)?.permissions();
perms.set_mode(0o755);
fs::set_permissions(path, perms)?;
Ok(())
}
#[cfg(not(unix))]
pub fn make_executable(_path: &Path) -> Result<()> {
Ok(())
}