From 5fa7fd0f90c9cf5f301b3b5cefa1cc7ebdc7a010 Mon Sep 17 00:00:00 2001 From: Echo Date: Wed, 20 May 2026 18:54:10 +0000 Subject: [PATCH] fix: detect apk at /sbin/apk on Alpine (not just /usr/bin/apk); v1.1.13 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/packages/mod.rs | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e34170..a220369 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1916,7 +1916,7 @@ dependencies = [ [[package]] name = "linux-patch-api" -version = "1.1.12" +version = "1.1.13" dependencies = [ "actix", "actix-rt", diff --git a/Cargo.toml b/Cargo.toml index 3a059a2..1e74706 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linux-patch-api" -version = "1.1.12" +version = "1.1.13" edition = "2021" authors = ["Echo "] description = "Secure remote package management API for Linux systems" diff --git a/src/packages/mod.rs b/src/packages/mod.rs index 27da74b..1332b6f 100644 --- a/src/packages/mod.rs +++ b/src/packages/mod.rs @@ -1180,7 +1180,9 @@ pub fn create_backend() -> Result> { } else if std::path::Path::new("/usr/bin/dnf").exists() { // TODO: Implement DnfBackend for RHEL/CentOS/Fedora 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())) } else if std::path::Path::new("/usr/bin/pacman").exists() { // TODO: Implement PacmanBackend for Arch