Skip to content

Commit

Permalink
Fix pacman support for resource resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
naman-crabnebula committed Mar 30, 2024
1 parent 2c7f9b2 commit 621398f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/resource-resolver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pub fn current_format() -> crate::Result<PackageFormat> {
Ok(PackageFormat::Deb)
} else if cfg!(CARGO_PACKAGER_FORMAT = "appimage") {
Ok(PackageFormat::AppImage)
} else if cfg!(CARGO_PACKAGER_FORMAT = "pacman") {
Ok(PackageFormat::Pacman)
} else {
Err(Error::UnkownPackageFormat)
}
Expand Down Expand Up @@ -94,7 +96,7 @@ pub fn resources_dir(package_format: PackageFormat) -> Result<PathBuf> {
.ok_or_else(|| Error::ParentNotFound(exe.clone()))?;
Ok(exe_dir.to_path_buf())
}
PackageFormat::Deb => {
PackageFormat::Deb | PackageFormat::Pacman => {
let exe = current_exe()?;
let exe_name = exe.file_name().unwrap().to_string_lossy();

Expand Down

0 comments on commit 621398f

Please sign in to comment.