fix(cli): use obscura-worker.exe on Windows (#140)
This commit is contained in:
1 parent
deb5be90ee
commit
27cd10156b
1 file changed
+3
-2
@@ -544,10 +544,11 @@ async fn run_parallel_scrape(
|
||||
);
|
||||
}
|
||||
|
||||
let worker_name = if cfg!(windows) { "obscura-worker.exe" } else { "obscura-worker" };
|
||||
let worker_path = std::env::current_exe()
|
||||
.ok()
|
||||
.and_then(|p| p.parent().map(|d| d.join("obscura-worker")))
|
||||
.unwrap_or_else(|| std::path::PathBuf::from("obscura-worker"));
|
||||
.and_then(|p| p.parent().map(|d| d.join(worker_name)))
|
||||
.unwrap_or_else(|| std::path::PathBuf::from(worker_name));
|
||||
|
||||
if !worker_path.exists() {
|
||||
anyhow::bail!(
|
||||
|
||||
Reference in new issue
Block a user