Private
Public Access
1
0

fix: detect apk at /sbin/apk on Alpine (not just /usr/bin/apk); v1.1.13

This commit is contained in:
2026-05-20 18:54:10 +00:00
parent 4d75bb0e29
commit 5fa7fd0f90
3 changed files with 5 additions and 3 deletions

2
Cargo.lock generated
View File

@ -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",

View File

@ -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"

View File

@ -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