8000 Panic during fetch · Issue #2 · gantoreno/macfetch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Panic during fetch #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ginkogruen opened this issue Jan 20, 2024 · 1 comment
Open

Panic during fetch #2

ginkogruen opened this issue Jan 20, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@ginkogruen
Copy link
8000

I got a panic during the display of the logo. I've got the following output:

macfetch
                    'c.           xxxxx@xxxxx
                 ,xNMM.           -----------------------
               .OMMMMo            OS: macOS 14.2.1
               OMMM0,             Host: Mac14,2
     .;loddo:' loolloddol;.       Kernel: 23.2.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:     Uptime: 31 days, 18 hours, 10 minutes
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.     Packages: 358 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.       Shell: /bin/zsh
;MMMMMMMMMMMMMMMMMMMMMMMM:        Resolution: 1470x956
:MMMMMMMMMMMMMMMMMMMMMMMM:        DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.       WM: Quartz Compositor
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotPresent', src/macfetch/segments/mod.rs:125:45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I sadly can't make sense of the error message.
My terminal is kitty if that's important.

paraversal added a commit to paraversal/macfetch that referenced this issue Dec 10, 2024
despite convention, TERM_PROGRAM is only set on some terminals and the unwrap() leads to crashes when ran terminals that don't set it, such as Alacritty and kitty (gantoreno#2). This issue is fixed by checking for terminal-specific vars for these two terminals and adds a graceful "unknown" fallback option in case anyone dare use a different terminal emulator.

Also had to run cargo update to make the program compile on the newest rust version.
@gantoreno
Copy link
Owner

Hey @ginkogruen, it's been a long time, this year was crazy for me with a lot of stuff going on at work and didn't have much time to look into this issue - sorry that you had to go on this long without an answer!

Thankfully, @paraversal put up a great contribution and I just merged #3, which should fix this. I'll try to release a new version this week, but in the meantime feel free to build from source and enjoy the fix in case you're still interested in running macfetch. I'll close this issue as soon as I release and ensure everything looks good. :)

@gantoreno gantoreno added the good first issue Good for newcomers label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants
0