mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: crash without applications.yaml #246
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @H4M5TER on GitHub (Sep 18, 2023).
Describe the bug
Komorebi will crash when I specify the conf to load because the
app_specific_configuration_pathis set to$env:KOMOREBI_CONFIG_HOME/applications.yaml.It throws os error 123 because there is no applications.yaml.
This is misleading. I spent a lot time finding the problem, thinking the conf path isn't correct.
To Reproduce
komorebi version 0.1.18 and 0.1.17
using sample komorebi.json
Expected behavior
tell me application.yml can't be found
Screenshots and Videos
Operating System
komorebic checkOutput@LGUG2Z commented on GitHub (Sep 18, 2023):
This is the intended behaviour, and this configuration can be omitted entirely as it is optional. The issue is that JSON and JSON-like formats to not natively support environment variable expansion. This config field currently only has a very basic string replacement that takes place for the user profile home dir environment variable.
I think we can probably add support for expanding the komorebi config home environment variable in this field, but ultimately I think that it is correct for the application to error when a specified file in the config is not found, including when the path includes an unrecognised environment variable.
Regarding the error feedback, I think we should explicitly specify which environment variables get expanded when used with this config option if it errors, and maybe even add this into the JSONSchema docs.
@H4M5TER commented on GitHub (Sep 22, 2023):
I think you are right. I have no problems with crash but I want information when it happens. Because I don't know the app_specific_configuration_path is set when I'm using the sample config. So an error message is good.
Thank you for your responding and maintaining!
@urob commented on GitHub (Nov 30, 2023):
Support for expanding
KOMOREBI_CONFIG_HOMEwould be great. Or maybe even autodetectapplications.yamlif it exists insideKOMOREBI_CONFIG_HOMEwithout the need to specify the path in the config file?@LGUG2Z commented on GitHub (May 12, 2024):
KOMOREBI_CONFIG_HOMEis now expanded, closing