Skip to content

Make THESEUS_CONFIG_DIR work in dev mode#5355

Open
creeperkatze wants to merge 5 commits intomodrinth:mainfrom
creeperkatze:app-config-dir-fix
Open

Make THESEUS_CONFIG_DIR work in dev mode#5355
creeperkatze wants to merge 5 commits intomodrinth:mainfrom
creeperkatze:app-config-dir-fix

Conversation

@creeperkatze
Copy link
Contributor

Fixes THESEUS_CONFIG_DIR not working when running the app via app:dev by using option_env!() (compile-time) instead of std::env::var_os() (runtime).

This aligns with the existing pattern used by MODRINTH_URL and other environment variables.

@creeperkatze
Copy link
Contributor Author

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.

@IMB11 IMB11 added the 📂 Under review [Triage] Is being reviewed by Modrinth Staff for future roadmap consideration. label Feb 18, 2026
@IMB11 IMB11 requested a review from a team March 9, 2026 19:30
@aecsocket
Copy link
Contributor

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 .env?

@creeperkatze
Copy link
Contributor Author

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 .env?

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 app:dev, no matter if i try setting it in powershell, globally or in .env.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📂 Under review [Triage] Is being reviewed by Modrinth Staff for future roadmap consideration.

Development

Successfully merging this pull request may close these issues.

3 participants