Skip to content

add: FOC_DEVNET_BASEDIR support for overriding ~/.foc-devnet#52

Merged
redpanda-f merged 5 commits intomainfrom
feat/redpanda/configurable-base-dir
Feb 2, 2026
Merged

add: FOC_DEVNET_BASEDIR support for overriding ~/.foc-devnet#52
redpanda-f merged 5 commits intomainfrom
feat/redpanda/configurable-base-dir

Conversation

@redpanda-f
Copy link
Collaborator

Configurable Base Directory with FOC_DEVNET_BASEDIR

Adds support for the FOC_DEVNET_BASEDIR environment variable to override the default ~/.foc-devnet base directory. The variable supports tilde expansion for paths like ~/custom-foc-devnet. Falls back to the default when the variable is not set. Includes the shellexpand crate for robust path expansion.

Copilot AI review requested due to automatic review settings January 30, 2026 06:35
@FilOzzy FilOzzy added this to FOC Jan 30, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Jan 30, 2026
@redpanda-f redpanda-f linked an issue Jan 30, 2026 that may be closed by this pull request
@redpanda-f redpanda-f requested a review from rvagg January 30, 2026 06:35
@redpanda-f
Copy link
Collaborator Author

split off from #40 so that CI issues can be tackled separately

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 for FOC_DEVNET_BASEDIR environment variable before falling back to default
  • Added shellexpand dependency 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

Copy link
Contributor

Copilot AI commented Jan 30, 2026

@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.

Copy link
Contributor

Copilot AI commented Jan 30, 2026

@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.

Copilot AI and others added 3 commits January 30, 2026 12:23
* 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>
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting review in FOC Jan 30, 2026
@redpanda-f
Copy link
Collaborator Author

@rvagg request re-review, added testing surrounding ENV_VAR

@rvagg rvagg changed the title add: FOC_DEVNET_BASERDIR support for overriding ~/.foc-devnet add: FOC_DEVNET_BASEDIR support for overriding ~/.foc-devnet Feb 2, 2026
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Feb 2, 2026
@redpanda-f redpanda-f merged commit b03d596 into main Feb 2, 2026
2 checks passed
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Make ~/.foc-devnet directory configurable.

3 participants