Skip to content

Commit

Permalink
fix(lib/pkg/pkg): fix PkgBuild parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
comfysage committed Feb 7, 2024
1 parent 95f1913 commit 254ddcc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion saku-lib/pkg/pkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ impl Pkg {
// data
impl Pkg {
pub fn from_string(str: String) -> Result<Self> {
let (_, build) = PkgBuild::parse(&str).map_err(|_| make_err!(Regex, "error while parsing flaskfile."))?;
let (_, build) = PkgBuild::parse(&str).map_err(|e| {
let e = e.to_string();
make_err!(Parse, "{e}")
})?;
let pkg = Self {
name: build.pkgname,
url: build.url,
Expand Down

0 comments on commit 254ddcc

Please sign in to comment.