add: FOC_DEVNET_BASEDIR support for overriding ~/.foc-devnet#52
add: FOC_DEVNET_BASEDIR support for overriding ~/.foc-devnet#52redpanda-f merged 5 commits intomainfrom
Conversation
|
split off from #40 so that CI issues can be tackled separately |
There was a problem hiding this comment.
Pull request overview
This PR adds support for configuring the base directory of foc-devnet through an environment variable FOC_DEVNET_BASEDIR, allowing users to override the default ~/.foc-devnet location. The implementation uses the shellexpand crate to handle tilde expansion in custom paths.
Changes:
- Modified
foc_devnet_home()function to check forFOC_DEVNET_BASEDIRenvironment variable before falling back to default - Added
shellexpanddependency for tilde expansion support in custom paths - Updated function documentation to reflect new environment variable behavior
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/paths.rs | Modified foc_devnet_home() to check FOC_DEVNET_BASEDIR env var and apply tilde expansion before defaulting to ~/.foc-devnet |
| Cargo.toml | Added shellexpand = "3.0" dependency for tilde expansion functionality |
| Cargo.lock | Added shellexpand 3.1.1 lockfile entry with its dependency on dirs crate |
|
@redpanda-f I've opened a new pull request, #53, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@redpanda-f I've opened a new pull request, #54, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Add documentation for FOC_DEVNET_BASEDIR environment variable Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
|
@rvagg request re-review, added testing surrounding ENV_VAR |
Configurable Base Directory with FOC_DEVNET_BASEDIR
Adds support for the
FOC_DEVNET_BASEDIRenvironment variable to override the default~/.foc-devnetbase directory. The variable supports tilde expansion for paths like~/custom-foc-devnet. Falls back to the default when the variable is not set. Includes theshellexpandcrate for robust path expansion.