Make THESEUS_CONFIG_DIR work in dev mode#5355
Make THESEUS_CONFIG_DIR work in dev mode#5355creeperkatze wants to merge 5 commits intomodrinth:mainfrom
Conversation
|
Just a little disclaimer, this changes the behavior to use compile-time environment variables (requiring rebuild to change). While the env variable shouldnt interfere with any app migration stuff, this could be breaking if THESEUS_CONFIG_DIR i used in some non-dev context. |
|
I don't think this should be a compile-time var. It seems reasonable to me to want to change the config dir at runtime without having to rebuild the entire app. What's the use case for this instead of just changing the env var's value before running the app, or adding it to |
I agree that runtime would make more sense, the problem is just that for some reason, the os level env doesnt work for me when running using When setting it globally, only the built version of the app uses that path as its config dir. I thought this var wasnt really needed for built versions, as the config directory can just be changed using the settings. |
Fixes THESEUS_CONFIG_DIR not working when running the app via
app:devby usingoption_env!()(compile-time) instead ofstd::env::var_os()(runtime).This aligns with the existing pattern used by MODRINTH_URL and other environment variables.