-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Summary
The config get command currently downloads configurations to the config subfolder inside the installation folder (AppFolder). This means downloaded configs are lost when upgrading Dev Proxy, because all installers (winget/Inno Setup, Homebrew, Linux setup scripts) overwrite the entire installation directory.
Current behavior
ConfigCommand.cs downloads to Path.Combine(appFolder, "config"):
var appFolder = ProxyUtils.AppFolder;
var configFolderPath = Path.Combine(appFolder, "config");This is the same folder that ships with preset configs (e.g. m365.json, microsoft-graph.json), so user-downloaded configs are mixed with built-in ones and both get overwritten on upgrade.
Proposed behavior
Download configs to a configs subfolder in the user data folder (the same folder used for the certificate and state):
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/dev-proxy/configs/ |
| Linux | ~/.config/dev-proxy/configs/ (or $XDG_CONFIG_HOME/dev-proxy/configs/) |
| Windows | %LocalAppData%\dev-proxy\configs\ |
This folder is already resolved by StateManager.GetConfigFolder() and is not touched by any installer.
Impact
- Downloaded configs survive upgrades
- Clear separation between built-in presets (installation
config/) and user-downloaded configs (user dataconfigs/) - Output messages with
~appFolderpaths would need updating to reflect the new location - Consider introducing a
~dataFoldertoken (or similar) for referencing the user data directory in CLI output