Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions apps/oxlint/src/tsgolint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,20 @@ impl<'a> TsGoLintState<'a> {
};

let handler = std::thread::spawn(move || {
let child = std::process::Command::new(self.executable_path)
let child = std::process::Command::new(&self.executable_path)
.arg("headless")
.stdin(std::process::Stdio::piped())
.stdout(std::process::Stdio::piped())
.spawn();

let Ok(mut child) = child else {
// For now, silently ignore errors if `tsgolint` does not appear to be installed, or cannot
// be spawned correctly.
return Ok(());
let mut child = match child {
Ok(c) => c,
Err(e) => {
return Err(format!(
"Failed to spawn tsgolint from path `{}`, with error: {e}",
self.executable_path.display()
));
}
};

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