SuperCuber / dotter

A dotfile manager and templater written in rust 🦀
The Unlicense
901 stars 48 forks source link

[BUG] Installation error in AUR from both dotter-rs and dotter-rs-git #179

Closed yuckyh closed 4 months ago

yuckyh commented 4 months ago

Environment

Description

There is a failing test in the package. The code panics due to an unhandled error from usingResult.unwrap()

Reproduction

  1. $ yay -S dotter-rs
  2. Installation fails due to failing test

Expected behavior

Tests to pass and dotter gets installed

Actual behavior

There was one failed test:

failures:

---- handlebars_helpers::test::eval_condition_helpers stdout ----
thread 'handlebars_helpers::test::eval_condition_helpers' panicked at src/handlebars_helpers.rs:403:10:
called `Result::unwrap()` on an `Err` value: 

Caused by:
    0: Error rendering "Unnamed template" line 1, col 1: Nested error: No such file or directory (os error 2)
    1: Nested error: No such file or directory (os error 2)
    2: No such file or directory (os error 2)

I am not sure what file or template the test was referring to. I managed to install it by disabling the test in PKGBUILD.

SuperCuber commented 4 months ago

I'm guessing the problem is missing which command. I've added hopefully better error reporting to that part of the code on the master branch - could you please test that it gives a better error message?

Also, you will need to have which command available for this helper to work. If you don't need to use it then feel free to skip the test (for example you can install from the repo directly using cargo install)

yuckyh commented 4 months ago

I have the which shell command in my system, but apparently the AUR package needs the which package as a dependency too. Do you have any idea where we can make any changes for AUR?

SuperCuber commented 4 months ago

@yuckyh It's maintained by orhun: https://github.com/orhun/PKGBUILDs