tonhowtf/omniget · error · anyhow::Error
spicetify falhou
Error message
spicetify {} falhou{} What it means
`run_ok` executes a spicetify CLI subcommand and requires it to exit successfully. When the command exits with a non-zero status, the library wraps the CLI's stderr (or stdout if stderr is empty) into this Portuguese error message. It is the generic surfacing point for any failure of the spicetify binary itself.
Solutions
- Read the `: <message>` suffix of the error — it contains the CLI's own stderr explaining the root cause
- Run the same spicetify command manually in a terminal to see the full output
- Run `spicetify restore backup` / reinstall spicetify to reset corrupted state
- Verify Spotify is installed at a location spicetify can detect and is a compatible version
- Re-run the install from the app after fixing the underlying spicetify issue
Example fix
// before
let out = Command::new(&cli).args(&args).output()?;
if !out.status.success() { /* error propagates with CLI stderr */ }
// after
let out = Command::new(&cli).args(&args).env("HOME", &home).output()?; // ensure correct env for CLI
if !out.status.success() {
log::warn!("spicetify {:?} stderr: {}", args, String::from_utf8_lossy(&out.stderr));
// surface msg to user / retry after `spicetify restore-backup`
} Defensive patterns
Strategy: try-catch
Validate before calling
let out = Command::new(&cli).args(&args).output()?;
if !out.status.success() {
eprintln!("spicetify will fail: {}", String::from_utf8_lossy(&out.stderr));
} Try / catch
match install_marketplace().await {
Err(e) if e.to_string().starts_with("spicetify") => {
let cli_msg = e.to_string().splitn(2, ": ").nth(1).unwrap_or("");
show_user_error(cli_msg); // show spicetify's own stderr
}
Err(e) => return Err(e),
Ok(_) => {}
} Prevention
- Verify Spotify is installed and a supported version before invoking spicetify
- Run `spicetify backup` before `apply`; restore backup after Spotify updates
- Surface the CLI's stderr (the `: msg` suffix) to the user — it names the real cause
- Keep spicetify-cli and the marketplace in compatible versions
When it happens
Trigger: Calling install_marketplace -> run_ok with args like `["backup","apply"]` or `["config-dir"]` when the spicetify CLI exits non-zero — e.g. Spotify not installed, corrupted spicetify state, or an unsupported subcommand.
Common situations: Spotify client version incompatible with spicetify; running `spicetify backup apply` without a prior `backup`; broken marketplace install; spicetify CLI printing an error to stderr; Spotify installed in a non-default location.
Understand the failure class
Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.
Related errors
- spicetify nao respondeu em 4 minutos
- formato desconhecido
- Download cancelled
- Proxy must include a scheme, e.g. http://127.0.0.1:7897
- Unsupported proxy scheme
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/7d5965ee29497071.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/spicetify.rs:113
code: output.status.code(),
stdout: strip_ansi(&String::from_utf8_lossy(&output.stdout)),
stderr: strip_ansi(&String::from_utf8_lossy(&output.stderr)),
})
}
/// Falha vira `Err` com a mensagem que o Spicetify imprimiu, para a UI
/// mostrar o motivo real ("Spotify not found", "already patched"…).
pub async fn run_ok(bin: &Path, args: &[&str]) -> anyhow::Result<CmdOutput> {
let out = run(bin, args).await?;
if out.ok {
return Ok(out);
}
let msg = if out.stderr.trim().is_empty() {
out.stdout.trim().to_string()
} else {
out.stderr.trim().to_string()
};
Err(anyhow!(
"spicetify {} falhou{}",
args.join(" "),
if msg.is_empty() {
String::new()
} else {
format!(": {}", msg)
}
))
}
// ---------- config.ini ----------
#[derive(Debug, Default, Clone, Serialize)]
pub struct SpicetifyConfig {
pub spotify_path: String,
pub prefs_path: String,
pub current_theme: String,
pub color_scheme: String,View on GitHub (pinned to 8600b91f42)