This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Chore: Improve User Experience in Cortex Uninstall Scripts for Linux and macOS #1429
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.
Describe Your Changes
This PR enhances the user experience (UX) in both Linux and macOS uninstall scripts by introducing the following improvements:
1. Default 'no' for Deletion Confirmation:
When prompted to delete the ~/.cortex data folder and .cortexrc configuration file, the script now defaults to 'no' if the user presses Enter without input. This prevents accidental data deletion.
2. Input Validation with Continuous Prompt:
If the user provides invalid input (anything other than 'yes', 'no', 'y', 'n'), the script now repeatedly prompts for valid input instead of exiting. This ensures the user can make a clear, informed choice.
3. Home Directory Adjustments:
For both Linux and macOS, if the script is run by the root user, the home directory is set to /root, instead of /home or /Users, ensuring correct file path handling for system administrators.
These improvements provide a more intuitive and safer interaction for users during the uninstall process.