Shemnei / punktf

⚡ A cross-platform multi-target dotfiles manager

Home Page:https://shemnei.github.io/punktf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] - `punktf diff` panics in `src/visit/diff/mod.rs`

i-ilak opened this issue · comments

Describe the bug
I have a setup that is very similar to your advanced, multi OS example (85). I run the following to get the crash

❯ punktf diff --profile macOS
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" }
Location: /Users/iilak/.cargo/registry/src/index.crates.io-6f17d22bba15001f/punktf-lib-2.0.0/src/visit/diff/mod.rs:214

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

To Reproduce
The issue seems to be related to non UTF-8 characters. Not sure where such a character should come from in my configs, but it might be worth testing it with one of them. Other than that, nothing special needed to reproduce this.

Expected behavior
Expected the program to terminate without crashing, i.e. pointing me to the issue (if there is one) to resolve it.

Desktop (please complete the following information):

  • OS: macOS
  • Version [e.g. 3.0.0]

Affected Profiles/Templates
My profile is essentially this and my config that I was looking at is very similar to this.

Hey @i-ilak thanks for reporting this and sorry for the long wait.

I have taken a look and your issue should be resolved with #149 (i will make a bug-fix release ).

If you could try with that and report if you still encounter any error, i would be very grateful.

Have a good day :)

Hi @Shemnei

Thanks a lot for the response. Worked perfectly! Thanks a lot for the fix and in general for punktf!