[Request] Look for config file in other set directories #761

Closed
opened 2026-01-29 16:21:51 +00:00 by claunia · 0 comments
Owner

Originally created by @Whovian9369 on GitHub (Nov 29, 2024).

Originally assigned to: @mnadareski on GitHub.

Is your feature request related to a problem? Please describe.
Look for config.json in directories other than the current working directory to make packaging for other environments more feasible.

For example, NixOS (or other systems that just use Nix as a package manager) has the application and pre-requisite files in a read-only directory/mount point, so unsuccessfully writing to config files in read-only directories can cause runtime issues or frustrations with the config file not being writable or available in the first place. Having that file available for MPF.Check in other directories, such as $HOME/.config/mpf/config.json, would help remedy that issue.

Describe the solution you'd like
config.json to be found in other directories, such as $HOME/.config/mpf/config.json, to make it easier for users where the main binary is in a read-only directory.

Describe alternatives you've considered
Hardcoding a config file into the built system presents a security issue where having a saved login could be viewed by all users of the system.

Additional context
N/A

Originally created by @Whovian9369 on GitHub (Nov 29, 2024). Originally assigned to: @mnadareski on GitHub. **Is your feature request related to a problem? Please describe.** Look for `config.json` in directories other than the current working directory to make packaging for other environments more feasible. For example, NixOS (or other systems that just use Nix as a package manager) has the application and pre-requisite files in a read-only directory/mount point, so unsuccessfully writing to config files in read-only directories can cause runtime issues or frustrations with the config file not being writable or available in the first place. Having that file available for `MPF.Check` in other directories, such as `$HOME/.config/mpf/config.json`, would help remedy that issue. **Describe the solution you'd like** `config.json` to be found in other directories, such as `$HOME/.config/mpf/config.json`, to make it easier for users where the main binary is in a read-only directory. **Describe alternatives you've considered** Hardcoding a config file into the built system presents a security issue where having a saved login could be viewed by all users of the system. **Additional context** N/A
claunia added the enhancement label 2026-01-29 16:21:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#761