rajasegar / alacritty-themes

:rainbow: :lollipop: Themes :candy: :heart_eyes: for Alacritty: A cross-platform GPU-accelerated Terminal emulator
MIT License
699 stars 71 forks source link

App breaks if you type a string that doesn't match a theme #13

Closed paulo-santana closed 3 years ago

paulo-santana commented 3 years ago

If you start typing to search a theme and mistype a character by accident, the app will throw an uncaught error where it says it didn't find a file with the name undefined.yml. Altough this is not critical, it's a bit of an annoyance having to run the command again and to wait for npx to do it's thing.

How to reproduce: just run npx alacritty-themes and type nonsense.

If I may suggest a fix for this, I'd say that we should either handle the thrown exception, or, more preferably, do not procceed to set the theme if the result of the search is undefined.