diff options
author | Marvin Hagemeister <marvinhagemeister50@gmail.com> | 2023-03-27 01:10:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 01:10:47 +0200 |
commit | 355275ec0ffb2f7e93ebb8494e24041d29ec51f0 (patch) | |
tree | d8a57ee31d122e049ef002e9c2bb19701b25b8ef /cli/graph_util.rs | |
parent | a29d88b43bdc3bf08a30fdb64d35beef8839f246 (diff) |
fix(cli): add colors to "Module not found" error frame (#18437)
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 6c38dccad..5dc7d17d6 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -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()) + )); } } |