Skip to content

Commit

Permalink
add unix specific execution permission to tp binary executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Shourya742 committed Dec 13, 2024
1 parent 2675ef9 commit 9ce0da6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion roles/tests-integration/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,17 @@ impl TemplateProvider {

unpack_tarball(&tarball_bytes, &temp_dir);

let bitcoind_binary = bitcoin_exe_home.join("bitcoind");

#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
let mut perms = std::fs::metadata(&bitcoind_binary).unwrap().permissions();
perms.set_mode(0o755);
std::fs::set_permissions(&bitcoind_binary, perms).unwrap();
}

if os == "macos" {
let bitcoind_binary = bitcoin_exe_home.join("bitcoind");
std::process::Command::new("codesign")
.arg("--sign")
.arg("-")
Expand Down

0 comments on commit 9ce0da6

Please sign in to comment.