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 Jun 7, 2023
1 parent c10ec10 commit d49a833
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 d49a833

Please sign in to comment.