Add --bpf-out-dir argument to control where the final build products land

This commit is contained in:
Michael Vines
2020-10-22 17:10:42 -07:00
committed by mergify[bot]
parent 4669fa0f98
commit b169d9cfbe
5 changed files with 47 additions and 25 deletions

View File

@ -54,7 +54,9 @@ fn load_bpf_program(
name: &str,
) -> Pubkey {
let path = create_bpf_path(name);
let mut file = File::open(path).unwrap();
let mut file = File::open(&path).unwrap_or_else(|err| {
panic!("Failed to open {}: {}", path.display(), err);
});
let mut elf = Vec::new();
file.read_to_end(&mut elf).unwrap();
load_program(bank_client, payer_keypair, loader_id, elf)