From b95e186078dcbd562571f3c218e2ebe5454ffcaf Mon Sep 17 00:00:00 2001 From: Daniel Porteous Date: Wed, 6 Mar 2024 16:09:40 +0000 Subject: [PATCH] Make install dir if not present in aptos update revela --- crates/aptos/src/update/revela.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/aptos/src/update/revela.rs b/crates/aptos/src/update/revela.rs index 62f1a758ed628e..3612ec5db09406 100644 --- a/crates/aptos/src/update/revela.rs +++ b/crates/aptos/src/update/revela.rs @@ -97,7 +97,13 @@ impl BinaryUpdater for RevelaUpdateTool { let install_dir = match self.install_dir.clone() { Some(dir) => dir, - None => get_additional_binaries_dir(), + None => { + let dir = get_additional_binaries_dir(); + // Make the directory if it doesn't already exist. + std::fs::create_dir_all(&dir) + .with_context(|| format!("Failed to create directory: {:?}", dir))?; + dir + }, }; let current_version = match &info.current_version {