Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make install dir if not present in aptos update revela #12401

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading