mirror of
https://github.com/denoland/deno
synced 2024-08-27 12:00:17 +00:00
fix(cli): add colors to "Module not found" error frame (#18437)
This commit is contained in:
parent
a29d88b43b
commit
355275ec0f
|
@ -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())
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
cli/tools/vendor/build.rs
vendored
2
cli/tools/vendor/build.rs
vendored
|
@ -1117,7 +1117,7 @@ mod test {
|
|||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
err.to_string(),
|
||||
test_util::strip_ansi_codes(&err.to_string()),
|
||||
concat!(
|
||||
"500 Internal Server Error\n",
|
||||
" at https://localhost/mod.ts:1:14"
|
||||
|
|
Loading…
Reference in a new issue