mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Shorten resolve many dev output (#885)
This commit is contained in:
parent
8c2b7d55af
commit
0dfbddd275
1 changed files with 14 additions and 1 deletions
|
@ -151,7 +151,20 @@ pub(crate) async fn resolve_many(args: ResolveManyArgs) -> Result<()> {
|
|||
{
|
||||
"Building source distributions is disabled".to_string()
|
||||
} else {
|
||||
format!("{err:?}")
|
||||
err.chain()
|
||||
.map(|err| {
|
||||
let formatted = err.to_string();
|
||||
// Cut overly long c/c++ compile output
|
||||
if formatted.lines().count() > 20 {
|
||||
let formatted: Vec<_> = formatted.lines().collect();
|
||||
formatted[..20].join("\n")
|
||||
+ "\n[...]\n"
|
||||
+ &formatted[formatted.len() - 20..].join("\n")
|
||||
} else {
|
||||
formatted
|
||||
}
|
||||
})
|
||||
.join("\n Caused by: ")
|
||||
};
|
||||
info!(
|
||||
"Error for {} ({}/{}, {} ms): {}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue