cli-enonic icon indicating copy to clipboard operation
cli-enonic copied to clipboard

Reduce duplicated code and expose a function for getting the enonic home dir

Open eiriksm opened this issue 1 year ago • 4 comments

This fixes #570

So if I wanted to make sure the directory was possible to override, I would first consolidate all different places the path to $HOME/.enonic was found.

Here is a first attempt to do that. Plus some actual tests for this repo

eiriksm avatar Oct 15 '24 12:10 eiriksm

Hi @eiriksm !

Thank you for the effort !

Would you be interested to extend your PR with actual override mechanic as you see it ?

NB. Overriding the default folder might get a bit tricky in case of running in snapcraft where we create a symlink to .enonic folder because of their execution policy.

pmi avatar Dec 13 '24 12:12 pmi

Sure

Here is the updated logic, including a test

eiriksm avatar Jan 14 '25 13:01 eiriksm

No idea how to build the docs, but attempted to add it there. Updated the var name, and made it a const

eiriksm avatar Jan 15 '25 13:01 eiriksm

Thanks ! Looks good ! Docs are built by github in master so we'll wait with merging until release !

pmi avatar Jan 17 '25 09:01 pmi