mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 11:40:04 +00:00
fix: binary need to have the right to be executed
This commit is contained in:
parent
90edbba221
commit
6f05d630f0
1 changed files with 6 additions and 0 deletions
|
@ -239,6 +239,12 @@ async fn main() -> Result<(), anyhow::Error> {
|
||||||
for (_name, source, dest, _link) in &bin_files {
|
for (_name, source, dest, _link) in &bin_files {
|
||||||
// TODO: check if file already exists
|
// TODO: check if file already exists
|
||||||
std::fs::copy(source, dest)?;
|
std::fs::copy(source, dest)?;
|
||||||
|
|
||||||
|
#[cfg(target_family = "unix")]
|
||||||
|
{
|
||||||
|
use std::os::unix::fs::PermissionsExt;
|
||||||
|
std::fs::set_permissions(dest, std::fs::Permissions::from_mode(0o755))?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate symlinks
|
// Generate symlinks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue