tonhowtf/omniget · error
whisper-cli sumiu depois de mover a pasta
Error message
whisper-cli sumiu depois de mover a pasta
What it means
install() finishes by swapping the staging dir into place (github::swap_dir) and then re-searching for whisper-cli in the final directory. If the executable cannot be found after the move, this internal-invariant error is returned — the swap somehow lost the binary that was just verified in staging.
Solutions
- Retry the install; the failure is usually transient (lock/AV interference).
- Exclude the app's managed-bin directory from antivirus real-time scanning.
- Check that the destination directory isn't locked by another running instance of the app.
- Inspect swap_dir's implementation if it recurs — the staging dir was verified, so the swap is at fault.
Defensive patterns
Strategy: retry
Try / catch
match whisper::install(variant, &progress).await {
Err(e) if e.to_string().contains("sumiu depois de mover") => {
// transient AV/lock interference: wait and retry the install
}
other => other?,
} Prevention
- Whitelist the managed-bin directory in antivirus software.
- Avoid running two app instances that install to the same directory concurrently.
- Install to local (non-network) disks.
When it happens
Trigger: github::find_file(&dir, bin_name("whisper-cli")) returns None after swap_dir succeeded — e.g. the swap silently moved/renamed the directory, antivirus/quarantine interference, or a partially failed filesystem operation on the destination.
Common situations: Antivirus or macOS Gatekeeper moving/blocking files right after extraction; the destination dir existing in a stale state so swap_dir falls back to a non-atomic copy that fails partially; filesystem sync issues on network mounts.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Failed to move into place
- gallery-dl binary not found after download
- Could not determine data directory
- o arquivo baixado nao contem o executavel do spicetify
- nao foi possivel mover a instalacao para o lugar
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/24bc76f6488184b9.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/whisper.rs:231
tracing::info!("[whisper] baixando {} ({})", asset.name, asset.tag);
let data = github::download(&client, &asset, false, &progress, "whisper-cli").await?;
let staging = dir.with_extension("new");
let _ = std::fs::remove_dir_all(&staging);
let staging_c = staging.clone();
let asset_name_c = asset.name.clone();
tokio::task::spawn_blocking(move || github::unpack(&data, &asset_name_c, &staging_c))
.await
.map_err(|e| anyhow!("Spawn blocking failed: {}", e))??;
let Some(exe) = github::find_file(&staging, &bin_name("whisper-cli")) else {
let _ = std::fs::remove_dir_all(&staging);
return Err(anyhow!("o pacote baixado nao contem o whisper-cli"));
};
github::make_executable(&exe);
// As libs (.dll/.so) ficam ao lado do executável no mesmo pacote.
github::swap_dir(&staging, &dir)?;
github::strip_quarantine(&dir).await;
let final_exe = github::find_file(&dir, &bin_name("whisper-cli"))
.ok_or_else(|| anyhow!("whisper-cli sumiu depois de mover a pasta"))?;
std::fs::write(dir.join("VERSION"), &asset.tag).ok();
Ok(final_exe)
}
#[derive(Debug, Clone, Deserialize)]
pub struct TranscribeOptions {
pub input: String,
pub model: String,
/// "auto" ou código ISO ("pt", "en").
pub language: String,
/// Traduzir a saída para inglês (recurso nativo do Whisper).
#[serde(default)]
pub translate: bool,
/// Tamanho máximo de segmento em caracteres (0 = deixar o modelo decidir).
#[serde(default)]
pub max_len: u32,
#[serde(default)]
pub prompt: String,View on GitHub (pinned to 8600b91f42)