Skip to content

Commit 1fa0045

Browse files
runningcodeclaude
andcommitted
ref: Improve error display format with separate lines
Display file path on first line, then show Error and Cause on indented lines for better readability and clearer error context. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 86c120d commit 1fa0045

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/commands/build/upload.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,13 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
325325
}
326326
);
327327
for (path, reason) in errored_paths_and_reasons {
328-
// Display the root cause (source) if available, otherwise show the main error
329-
let error_msg = reason
330-
.source()
331-
.map(|source| source.to_string())
332-
.unwrap_or_else(|| reason.to_string());
333-
warn!(" - {} ({})", path.display(), error_msg);
328+
warn!(" - {}", path.display());
329+
if let Some(source) = reason.source() {
330+
warn!(" Error: {}", reason);
331+
warn!(" Cause: {}", source);
332+
} else {
333+
warn!(" Error: {}", reason);
334+
}
334335
}
335336
}
336337

0 commit comments

Comments
 (0)