We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ed89e commit 05578a1Copy full SHA for 05578a1
crates/napi/src/util.rs
@@ -53,8 +53,15 @@ static PANIC_LOG: Lazy<PathBuf> = Lazy::new(|| {
53
});
54
55
pub fn log_panic_and_inform(err_info: impl Debug) {
56
- if cfg!(debug_assertions) || env::var("SWC_DEBUG") == Ok("1".to_string()) {
57
- eprintln!("{:?}", err_info);
+ if cfg!(debug_assertions)
+ || env::var("SWC_DEBUG") == Ok("1".to_string())
58
+ || env::var("CI").is_ok_and(|v| !v.is_empty())
59
+ {
60
+ eprintln!(
61
+ "{}: An unexpected Turbopack error occurred:\n{:?}",
62
+ "FATAL".red().bold(),
63
+ err_info
64
+ );
65
return;
66
}
67
0 commit comments