🎨 Palette: Add overwrite confirmation to exfig init - #26
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
…g init`
This change improves the UX and safety of the `exfig init` command by:
1. Checking if `exfig.yaml` already exists.
2. If it exists and the session is interactive, prompting the user for confirmation ("Overwrite? [y/N]").
3. If it exists and the session is non-interactive (e.g., CI), failing with an error to prevent accidental data loss.
This prevents users from accidentally destroying their configuration files.
Test Plan:
- Verified logic with standalone script simulating TTY and non-TTY environments.
- Verified prompt appears and accepts "y"/"yes" (case-insensitive) to proceed.
- Verified "n"/EOF aborts operation.
- Verified non-TTY environment fails with error if file exists.
6c34a77 to
82977aa
Compare
Added a confirmation prompt to
exfig initwhen the config file already exists, preventing accidental overwrite. Also ensures non-interactive environments fail safely instead of hanging or silently overwriting.PR created automatically by Jules for task 3536322549226177823 started by @alexey1312