Shemnei / punktf

⚡ A cross-platform multi-target dotfiles manager
https://shemnei.github.io/punktf/
Other
88 stars 7 forks source link

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

Closed i-ilak closed 10 months ago

i-ilak commented 11 months ago

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):

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

Shemnei commented 10 months ago

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 :)

i-ilak commented 10 months ago

Hi @Shemnei

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