Fix: Attempt #1 Windows Workflow

This commit is contained in:
Youwes09
2026-03-20 21:07:19 -05:00
parent 7df7191799
commit 57bf9d5fb1
4 changed files with 40 additions and 55 deletions
+14 -19
View File
@@ -247,25 +247,20 @@ fn resolve_server_binary(
}
// Fall back to PATH — covers Nix, distro packages, and any system install.
{
#[cfg(target_os = "windows")]
let which_cmd = "where";
#[cfg(not(target_os = "windows"))]
let which_cmd = "which";
for name in &["tachidesk-server", "suwayomi-server"] {
if std::process::Command::new(which_cmd)
.arg(name)
.output()
.map(|o| o.status.success())
.unwrap_or(false)
{
return Ok(ServerInvocation {
bin: std::ffi::OsString::from(name),
prefix_args: vec![],
working_dir: None,
});
}
// Windows always hits the early return above so this block is Linux/macOS only.
#[cfg(not(target_os = "windows"))]
for name in &["tachidesk-server", "suwayomi-server"] {
if std::process::Command::new("which")
.arg(name)
.output()
.map(|o| o.status.success())
.unwrap_or(false)
{
return Ok(ServerInvocation {
bin: std::ffi::OsString::from(name),
prefix_args: vec![],
working_dir: None,
});
}
}