Skip to content

🎨 Palette: Add overwrite confirmation to exfig init - #26

Merged
alexey1312 merged 1 commit into
mainfrom
palette-config-overwrite-confirmation-3536322549226177823
Dec 31, 2025
Merged

🎨 Palette: Add overwrite confirmation to exfig init#26
alexey1312 merged 1 commit into
mainfrom
palette-config-overwrite-confirmation-3536322549226177823

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

Added a confirmation prompt to exfig init when 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

@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


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.
@alexey1312
alexey1312 force-pushed the palette-config-overwrite-confirmation-3536322549226177823 branch from 6c34a77 to 82977aa Compare December 31, 2025 16:43
@alexey1312
alexey1312 marked this pull request as ready for review December 31, 2025 16:45
@alexey1312
alexey1312 merged commit 8fe1339 into main Dec 31, 2025
2 of 3 checks passed
@alexey1312
alexey1312 deleted the palette-config-overwrite-confirmation-3536322549226177823 branch December 31, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant