enonic / cli-enonic

GNU General Public License v3.0
41 stars 2 forks source link

Make it possible to override the location of $HOME/.enonic #570

Open eiriksm opened 1 month ago

eiriksm commented 1 month ago

My use case is to use docker for development.

I could of course set the HOME variable to something else That would make it inconvenient to run other types of programs in this container.

Or I could mount a volume inside $HOME/.enonic Totally possible I guess

What I would like though, would be a separate environment variable. Something like ENONIC_ROOT

From skimming the codebase I see this would also be helpful in terms of utility functions. Currently theres a GetHomeDir which is usually used to join path with HOME and .enonic. How about a GetEnonicDir where you don't have to join it, and you are allowed to override it? Falling back to GetHomeDir for backwards compatibility. Something worth considering?