[BUG]: crash without applications.yaml #246

Closed
opened 2026-01-05 14:49:15 +01:00 by adam · 4 comments
Owner

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_path is 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

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

komorebic check Output

KOMOREBI_CONFIG_HOME detected: C:\Users\zhuxx\.config\komorebi

Looking for configuration files in C:\Users\zhuxx\.config\komorebi

Found komorebi.ahk; this file will be autoloaded by komorebi
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_path` is 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** ``` OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19045 N/A Build 19045 ``` **`komorebic check` Output** ``` KOMOREBI_CONFIG_HOME detected: C:\Users\zhuxx\.config\komorebi Looking for configuration files in C:\Users\zhuxx\.config\komorebi Found komorebi.ahk; this file will be autoloaded by komorebi ```
adam added the bug label 2026-01-05 14:49:15 +01:00
adam closed this issue 2026-01-05 14:49:15 +01:00
Author
Owner

@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.

@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.
Author
Owner

@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!

@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!
Author
Owner

@urob commented on GitHub (Nov 30, 2023):

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.

Support for expanding KOMOREBI_CONFIG_HOME would be great. Or maybe even autodetect applications.yaml if it exists inside KOMOREBI_CONFIG_HOME without the need to specify the path in the config file?

@urob commented on GitHub (Nov 30, 2023): > 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. Support for expanding `KOMOREBI_CONFIG_HOME` would be great. Or maybe even autodetect `applications.yaml` if it exists inside `KOMOREBI_CONFIG_HOME` without the need to specify the path in the config file?
Author
Owner

@LGUG2Z commented on GitHub (May 12, 2024):

KOMOREBI_CONFIG_HOME is now expanded, closing

@LGUG2Z commented on GitHub (May 12, 2024): `KOMOREBI_CONFIG_HOME` is now expanded, closing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#246