Skip to content

Commit

Permalink
[CLI] Improve error message when compilation fails in aptos move publ…
Browse files Browse the repository at this point in the history
…ish (#8556)
  • Loading branch information
banool authored and gedigi committed Aug 2, 2023
1 parent 5b6dda4 commit 53aeb7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/aptos/src/move_tool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@ impl TryInto<PackagePublicationData> for &PublishPackage {
self.move_options.named_addresses(),
self.move_options.bytecode_version,
);
let package = BuiltPackage::build(package_path, options)?;
let package = BuiltPackage::build(package_path, options)
.map_err(|e| CliError::MoveCompilationError(format!("{:#}", e)))?;
let compiled_units = package.extract_code();
let metadata_serialized =
bcs::to_bytes(&package.extract_metadata()?).expect("PackageMetadata has BCS");
Expand Down

0 comments on commit 53aeb7b

Please sign in to comment.