Project
cortex
Description
create_backup in uninstall_cmd.rs sets backup_dir to dirs::home_dir()?.join(".cortex-backup") (with fallbacks). It does not nest backups under CORTEX_HOME or cortex_common::get_cortex_home().
Users who relocate all Cortex state with CORTEX_HOME may expect uninstall backups to live beside that tree; instead, backups always go to the OS user home .cortex-backup, splitting artifacts across locations.
Build / context:
- Build: Current
cortex-cli.
- Surface:
cortex uninstall --backup.
- File:
src/cortex-cli/src/uninstall_cmd.rs (create_backup, ~lines 711–720).
Error Message
Debug Logs
System Information
Screenshots
https://github.com/fremicout04/blog/blob/main/Screenshot%202026-04-09%20172554.png
Steps to Reproduce
- Set
CORTEX_HOME to a dedicated directory with Cortex data.
- Run
cortex uninstall --backup --dry-run (or full flow in a test VM) and note printed Backup location.
- Observe path under
%USERPROFILE% / $HOME, not under CORTEX_HOME.
Expected Behavior
- Use
get_cortex_home().join(".cortex-backup") (or CORTEX_HOME/../cortex-backup policy documented in --help).
Actual Behavior
- Fixed
<user home>/.cortex-backup.
Additional Context
No response
Project
cortex
Description
create_backupinuninstall_cmd.rssetsbackup_dirtodirs::home_dir()?.join(".cortex-backup")(with fallbacks). It does not nest backups underCORTEX_HOMEorcortex_common::get_cortex_home().Users who relocate all Cortex state with
CORTEX_HOMEmay expect uninstall backups to live beside that tree; instead, backups always go to the OS user home.cortex-backup, splitting artifacts across locations.Build / context:
cortex-cli.cortex uninstall --backup.src/cortex-cli/src/uninstall_cmd.rs(create_backup, ~lines 711–720).Error Message
Debug Logs
System Information
Screenshots
https://github.com/fremicout04/blog/blob/main/Screenshot%202026-04-09%20172554.png
Steps to Reproduce
CORTEX_HOMEto a dedicated directory with Cortex data.cortex uninstall --backup --dry-run(or full flow in a test VM) and note printed Backup location.%USERPROFILE%/$HOME, not underCORTEX_HOME.Expected Behavior
get_cortex_home().join(".cortex-backup")(orCORTEX_HOME/../cortex-backuppolicy documented in--help).Actual Behavior
<user home>/.cortex-backup.Additional Context
No response