Add support for shell expansions (~, env vars) in config paths#2389
Merged
dgageot merged 1 commit intodocker:mainfrom Apr 12, 2026
Merged
Conversation
Expand tilde (~) and environment variables (${HOME}, $VAR) in path
fields for memory and tasks toolsets via a new path.ExpandPath utility.
A shared resolveToolsetPath helper deduplicates the expand+validate
pattern across both toolset creators.
Fixes docker#2320
Assisted-By: docker-agent
derekmisler
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for tilde (
~) and environment variable (${HOME},$VAR) expansion inpathfields for memory and tasks toolsets.Changes
pkg/path/expand.go: NewExpandPathutility that expands~to the home directory and environment variables viaos.ExpandEnv.pkg/path/expand_test.go: Tests covering tilde, env vars, combined patterns, and passthrough of absolute/relative paths.pkg/teamloader/registry.go: Extracted a sharedresolveToolsetPathhelper used by bothcreateMemoryToolandcreateTasksToolto expand, resolve, and validate paths.Example
Fixes #2320