Repository navigation
Expand leading ~/ to home directory in config file paths - #1936
Merged
waldekmastykarz merged 5 commits intoOct 21, 2026
Merged
Conversation
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Expand ~/ to home directory in config file paths
Expand leading ~/ to home directory in config file paths
Oct 20, 2026
waldekmastykarz
marked this pull request as ready for review
October 20, 2026 17:49
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review supports the requested behavior with no unresolved findings; automated tests were not executed.
No open issues 🎉
What changed in this PR
Adds home-directory expansion to Dev Proxy’s shared path handling, addressing #1933.
Changes:
- Expands leading
~/and Windows~\, preserving other tilde forms. - Adds path-resolution tests and updates help and documentation.
- Updates transitive dependency lock entries.
| File | Description |
|---|---|
| skills/dev-proxy/references/configuration.md | Documents home-relative paths. |
| DevProxy/packages.lock.json | Updates application dependency graph. |
| DevProxy/Commands/DevProxyCommand.cs | Documents ~/ in CLI help. |
| DevProxy.Proxy.Kestrel/packages.lock.json | Updates proxy dependency graph. |
| DevProxy.Abstractions/Utils/ProxyUtils.cs | Implements shared home-directory expansion. |
| DevProxy.Abstractions.Tests/Utils/ProxyUtilsTests.cs | Covers expansion and unchanged path forms. |
| .github/copilot-instructions.md | Documents supported path tokens. |
Review effort: Balanced
Collaborator
|
@copilot build is failing. Fix |
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Contributor
Author
Refreshed the two consumer lock files in |
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.
Config paths support
~appFolderand~dataFolderbut not~/. A path like~/mocks/mocks.jsonis resolved relative to the config file, as if~were a folder name. Shells, git and mitmproxy all treat it as the home directory.Changes
ProxyUtils.ReplacePathTokens: expands a leading~/(and~\on Windows only) toEnvironment.SpecialFolder.UserProfilebefore the existing token replacement. Every caller picks this up:GetFullPath,--config-file, plugin paths, mock/error/data files and@fileresponse bodies.~/is expanded.~foo/...,a/~/band a bare~are left unchanged.\into/before this runs, so~\inpluginPathis also expanded on Linux and macOS.ProxyUtilsTestscovers expansion, the Windows-only backslash form, paths that must not change, andGetFullPathresolving to home rather than the config folder.~/in the--config-filehelp text,.github/copilot-instructions.mdandskills/dev-proxy/references/configuration.md.Example