Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

eiriksm
Copy link

@eiriksm eiriksm commented Oct 15, 2024

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

@alansemenov alansemenov requested a review from pmi December 13, 2024 11:15
@pmi
Copy link
Member

pmi commented Dec 13, 2024

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.

@eiriksm
Copy link
Author

eiriksm commented Jan 14, 2025

Sure

Here is the updated logic, including a test

Copy link
Member

@pmi pmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!
Just a couple of minor things:

Add new env var to the table here

|`ENONIC_CLI_REMOTE_URL`

internal/app/util/util.go Outdated Show resolved Hide resolved
@eiriksm
Copy link
Author

eiriksm commented Jan 15, 2025

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

@pmi
Copy link
Member

pmi commented Jan 17, 2025

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

@pmi pmi self-requested a review January 17, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to override the location of $HOME/.enonic
2 participants