mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix(cli): add colors to "Module not found" error frame (#18437)
This commit is contained in:
parent
a29d88b43b
commit
355275ec0f
2 changed files with 7 additions and 2 deletions
|
@ -96,7 +96,12 @@ pub fn graph_valid(
|
|||
|
||||
if let Some(range) = error.maybe_range() {
|
||||
if !is_root && !range.specifier.as_str().contains("/$deno$eval") {
|
||||
message.push_str(&format!("\n at {range}"));
|
||||
message.push_str(&format!(
|
||||
"\n at {}:{}:{}",
|
||||
colors::cyan(range.specifier.as_str()),
|
||||
colors::yellow(&(range.start.line + 1).to_string()),
|
||||
colors::yellow(&(range.start.character + 1).to_string())
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue