Skip to content

Conversation

@johnnyhuy
Copy link
Collaborator

@johnnyhuy johnnyhuy commented May 24, 2025

Fixes #14

Problem

The transcribe-me install command was attempting to modify shell profile files (like .zshrc or .bashrc) without asking for user permission. This caused issues for users with read-only configuration files, particularly those using systems like NixOS with home-manager.

Solution

This PR modifies the append_to_shell_profile function to:

  1. Ask for user confirmation before modifying any shell profile files
  2. Provide a clear message about what will be added to the file
  3. Handle permission errors gracefully with helpful error messages
  4. Show instructions for manual setup if the user declines or if there's an error

Changes

  • Added user confirmation prompt before modifying shell profiles
  • Added error handling for permission issues
  • Added fallback instructions for manual environment variable setup
  • Improved user messaging throughout the process

Testing

Manually tested the installation process to verify that:

  • The user is prompted before any shell profile modifications
  • The user can decline and still proceed with installation
  • Error handling works correctly when permission is denied
  • Instructions for manual setup are clear and helpful

This change respects user preferences and system configurations while still providing a smooth setup experience.

@johnnyhuy johnnyhuy merged commit fa32ccd into main May 25, 2025
4 checks passed
@johnnyhuy johnnyhuy deleted the fix/zshrc-overwrite-issue branch May 25, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tries to overwrite my .zshrc

2 participants