Skip to content

Commit aec679e

Browse files
committed
fix(linter/tsgolint): report an error if tsgolint executable failed to spawn
1 parent d7cca12 commit aec679e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

apps/oxlint/src/tsgolint.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,14 @@ impl<'a> TsGoLintState<'a> {
104104
.stdout(std::process::Stdio::piped())
105105
.spawn();
106106

107-
let Ok(mut child) = child else {
108-
// For now, silently ignore errors if `tsgolint` does not appear to be installed, or cannot
109-
// be spawned correctly.
110-
return Ok(());
107+
let mut child = match child {
108+
Ok(c) => c,
109+
Err(e) => {
110+
return Err(format!(
111+
"Failed to spawn tsgolint from path `{}`, with error: {e}",
112+
self.executable_path
113+
));
114+
}
111115
};
112116

113117
let mut stdin = child.stdin.take().expect("Failed to open tsgolint stdin");

0 commit comments

Comments
 (0)