fix: detect apk at /sbin/apk on Alpine (not just /usr/bin/apk); v1.1.13
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1916,7 +1916,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-patch-api"
|
name = "linux-patch-api"
|
||||||
version = "1.1.12"
|
version = "1.1.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix",
|
"actix",
|
||||||
"actix-rt",
|
"actix-rt",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "linux-patch-api"
|
name = "linux-patch-api"
|
||||||
version = "1.1.12"
|
version = "1.1.13"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Echo <echo@moon-dragon.us>"]
|
authors = ["Echo <echo@moon-dragon.us>"]
|
||||||
description = "Secure remote package management API for Linux systems"
|
description = "Secure remote package management API for Linux systems"
|
||||||
|
|||||||
@ -1180,7 +1180,9 @@ pub fn create_backend() -> Result<Box<dyn PackageManagerBackend>> {
|
|||||||
} else if std::path::Path::new("/usr/bin/dnf").exists() {
|
} else if std::path::Path::new("/usr/bin/dnf").exists() {
|
||||||
// TODO: Implement DnfBackend for RHEL/CentOS/Fedora
|
// TODO: Implement DnfBackend for RHEL/CentOS/Fedora
|
||||||
Err(anyhow::anyhow!("DNF backend not yet implemented"))
|
Err(anyhow::anyhow!("DNF backend not yet implemented"))
|
||||||
} else if std::path::Path::new("/usr/bin/apk").exists() {
|
} else if std::path::Path::new("/usr/bin/apk").exists()
|
||||||
|
|| std::path::Path::new("/sbin/apk").exists()
|
||||||
|
{
|
||||||
Ok(Box::new(ApkBackend::new()))
|
Ok(Box::new(ApkBackend::new()))
|
||||||
} else if std::path::Path::new("/usr/bin/pacman").exists() {
|
} else if std::path::Path::new("/usr/bin/pacman").exists() {
|
||||||
// TODO: Implement PacmanBackend for Arch
|
// TODO: Implement PacmanBackend for Arch
|
||||||
|
|||||||
Reference in New Issue
Block a user