cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: Add environment variable expansion for docker config plugin dirs

Open Paulchen5 opened this issue 3 months ago • 6 comments

- What I did

  • Added environment variable expansion to the config plugin dirs
  • Added an example test (I guess 😅 )

Closes #6486

- How I did it

  • searching for config file references in the code, thinking and assisted by GitHub Copilot

- How to verify it

  • run the tests (I guess 😅 )

- Human readable description for the release notes

Add support to expand environment variables in docker plugin config directory string

- Add support to expand environment variables in docker plugin config directory string

I am really really new to Go like 0.5% experience. The test is mainly assisted by Copilot with a bit of brain usage by my side. Feel free to help me to add like a negative test or something like that if the current one is not enough

- A picture of a cute animal (not mandatory but encouraged) ducks

Paulchen5 avatar Sep 25 '25 06:09 Paulchen5

Hi @vvoland, any updates on this?

Paulchen5 avatar Oct 01 '25 14:10 Paulchen5

LGTM after squashing commits

vvoland avatar Oct 02 '25 17:10 vvoland

I'm slightly on the fence; wondering; does the (for the example) $HOMEBREW_PREFIX env-var ever change? And would it be an option to expand the env-var before adding the path to the config?

The point here is that we don't to env-var expansion for any of the other paths, so this may now become a sliding slope where it needs to be added to every path that's in config; the extraPaths was already added to allow customisation with a custom set of extra directories.

thaJeztah avatar Oct 02 '25 17:10 thaJeztah

I'm slightly on the fence; wondering; does the (for the example) $HOMEBREW_PREFIX env-var ever change? And would it be an option to expand the env-var before adding the path to the config?

In general the $HOMEBREW_PREFIX env-var shouldn't really change as far as I know. At least when using standard configuration. However when writing a guide for example it's more helpful / clear wo write the path with the prefix into the guide so the reader has to think less about the content. So I think it would be a nice and helpful feature which shouldn't break somethin.

The point here is that we don't to env-var expansion for any of the other paths, so this may now become a sliding slope where it needs to be added to every path that's in config; the extraPaths was already added to allow customisation with a custom set of extra directories.

Feel free to tell me about the option names / code files and I will have a look whether I can implement it for the additional options

@thaJeztah

Paulchen5 avatar Oct 02 '25 20:10 Paulchen5

LGTM after squashing commits

done 👍

Paulchen5 avatar Oct 02 '25 20:10 Paulchen5

Hey @vvoland are the changes fine and is it fine when I ping you? I don't wanna annoy you 😅

Paulchen5 avatar Oct 18 '25 14:10 Paulchen5