Skip to content

feat: self update#41

Merged
1 commit merged into
mainfrom
ens/sdk-1272-self-update
Jan 19, 2024
Merged

feat: self update#41
1 commit merged into
mainfrom
ens/sdk-1272-self-update

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 18, 2024

Description

Adds the dfxvm self update command.

Fixes https://dfinity.atlassian.net/browse/SDK-1272

How Has This Been Tested?

Added tests

Tested locally by:

  • change Cargo.toml version and rebuild
  • run dfxvm self update
  • it downloads and extracts the tarball, but fails when trying to call the contained binary with dfxvm-init --self-replace, since the older releases obviously don't support this functionality
  • copied the dfxvm binary over the dfxvm-init-self-update binary in the bin directory
  • called dfxvm-init-self-update --self-replace in the bin directory

Checklist:

  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation in docs/cli-reference.

@ghost ghost marked this pull request as ready for review January 18, 2024 22:08
@ghost ghost self-requested a review as a code owner January 18, 2024 22:08
#[error(transparent)]
DownloadLatestBinaryError(#[from] DownloadLatestBinaryError),

#[error("failed to execute {command:#?}")]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[error("failed to execute {command:#?}")]
#[error("failed to execute {command:#?}. Error: {source}")]

I feel like having the error available would make support on e.g. the forum much easier

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens automatically, because the variable is called source. See https://github.com/dfinity/dfxvm/blob/main/src/log.rs#L30

@ghost ghost merged commit 9275dd3 into main Jan 19, 2024
@ghost ghost deleted the ens/sdk-1272-self-update branch January 19, 2024 17:26
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant