Skip to content

Commit c4a2e73

Browse files
laundmoabonander
authored andcommitted
Add context to metadata parse error
1 parent c4130d4 commit c4a2e73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sqlx-cli/src/prepare.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ hint: This command only works in the manifest directory of a Cargo package."#
111111

112112
let output_str =
113113
std::str::from_utf8(&output.stdout).context("Invalid `cargo metadata` output")?;
114-
let metadata: Metadata = output_str.parse()?;
114+
let metadata: Metadata = output_str.parse().context(
115+
"Issue parsing `cargo metadata` output - consider manually running it to check for issues",
116+
)?;
115117

116118
// try removing the target/sqlx directory before running, as stale files
117119
// have repeatedly caused issues in the past.

0 commit comments

Comments
 (0)