mirror of
https://github.com/Felitendo/spotifast.git
synced 2026-11-01 17:33:26 +01:00
12 lines
459 B
Rust
12 lines
459 B
Rust
fn main() -> anyhow::Result<()> {
|
|
let path = std::env::args_os()
|
|
.nth(1)
|
|
.ok_or_else(|| anyhow::anyhow!("Pass the application executable path"))?;
|
|
let path = std::path::PathBuf::from(path).canonicalize()?;
|
|
match spotifast::updates::install::detect_at(&path) {
|
|
Ok(installation) => println!("{}", serde_json::to_string(&installation)?),
|
|
Err(error) => println!("Managed or unsupported: {error:#}"),
|
|
}
|
|
Ok(())
|
|
}
|