Skip to content

Commit

Permalink
Make install dir if not present in aptos update revela (#12401)
Browse files Browse the repository at this point in the history
  • Loading branch information
banool authored Mar 6, 2024
1 parent 76450c4 commit bb60b3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/aptos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to the Aptos CLI will be captured in this file. This project

## Unreleased

## [3.0.1] - 2024/03/05
- Fix bug in `aptos update revela` if default install directory doesn't exist.

## [3.0.0] - 2024/03/05
- **Breaking Change**: `aptos update` is now `aptos update aptos`.
- Added `aptos update revela`. This installs / updates the `revela` binary, which is needed for the new `aptos move decompile` subcommand.
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "aptos"
description = "Aptos tool for management of nodes and interacting with the blockchain"
version = "3.0.0"
version = "3.0.1"

# Workspace inherited keys
authors = { workspace = true }
Expand Down
8 changes: 7 additions & 1 deletion crates/aptos/src/update/revela.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bb60b3a

Please sign in to comment.