Skip to content

fix: show init guidance when overwrite declined#15

Open
saurabhhhcodes wants to merge 1 commit into
tanmayjoddar:mainfrom
saurabhhhcodes:codex/init-decline-guidance-4
Open

fix: show init guidance when overwrite declined#15
saurabhhhcodes wants to merge 1 commit into
tanmayjoddar:mainfrom
saurabhhhcodes:codex/init-decline-guidance-4

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Summary

  • print helpful next steps when apidrift init finds an existing config and the user declines overwrite
  • keep the existing config untouched in the decline path
  • share the next-step guidance between successful init and declined overwrite flows
  • add Jest coverage for the decline/no-overwrite behavior

Fixes #4

Validation

  • git diff --check
  • node --check src/commands/init.js
  • node --check tests/commands/init.test.js
  • npm test -- --runInBand could not run locally because npm is not available in this shell

GSSoC labels requested

Please add/keep gssoc, type:bug, and the required difficulty/scoring labels if this is accepted.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Hi maintainer, this is still ready for review. I rechecked the branch locally and the declined-overwrite flow now keeps exit code 0, leaves the existing config untouched, and prints actionable next steps instead of exiting silently. The current Jest suite passes locally on the repo's current mainline. When you review, please also copy the GSSoC scoring labels to the PR if the scope looks good.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Hi @tanmayjoddar, quick follow-up here as well: this PR is still open and mergeable from my side, and the config overwrite flow remains aligned with the issue scope after the latest recheck. When you get a chance to review, this should be in a good state to merge. If it qualifies for GSSoC scoring, please add the relevant labels during review/merge too.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Hi! This PR is still mergeable on GitHub from my side. If you want any tweaks before merge, I can make them quickly; otherwise, a review pass here would be appreciated.

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.

bug: init should not exit silently when config exists (no overwrite)

1 participant