fix(doctor): honor --yes for repo fingerprint fix in doctor --fix#1782
Merged
steveyegge merged 1 commit intoFeb 16, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #1772.
bd doctor --fix --yesis documented as non-interactive, butRepo Fingerprintfix still prompted forChoice [1/2/s]and blocked automation (or failed with EOF in non-interactive environments).This PR makes
--yesfully non-interactive for the fingerprint fix path by auto-selecting the recommended action (update-repo-id) and passing--yesthrough to migrate.Related report: #1772
Background / Root Cause
applyFixList(...)incmd/bd/doctor_fix.gocalledfix.RepoFingerprint(path)without passingdoctorYes.Inside
cmd/bd/doctor/fix/repo_fingerprint.go,RepoFingerprintalways read from stdin (Choice [1/2/s]) before deciding an action.So even with
bd doctor --fix --yes, the fingerprint fix path remained interactive.What This PR Changes
--yesinto fingerprint fix flowcmd/bd/doctor_fix.goRepo Fingerprintcase now calls:fix.RepoFingerprint(path, doctorYes)cmd/bd/doctor/fix/repo_fingerprint.goRepoFingerprint(path, autoYes bool)now:autoYes=true, skips promptbd migrate --update-repo-id --yes--yesis not set[1]/[2]/[s]flow remains unchanged for interactive runs.cmd/bd/doctor/fix/repo_fingerprint_test.goTestRepoFingerprint_AutoYesSkipsPromptAndPassesYesToMigrateTestRepoFingerprint_ChoiceOneRunsUpdateRepoIDWithoutYesScope / Non-goals
This PR only addresses non-interactive semantics for
Repo Fingerprintindoctor --fix.It does not change:
Tests
Added:
cmd/bd/doctor/fix/repo_fingerprint_test.goValidated locally with:
go build -tags gms_pure_go ./cmd/bdgo test -tags gms_pure_go ./cmd/bd/doctor/fix -run RepoFingerprint -count=1Why this is safe
--yesis explicitly intended for non-interactive operation.--yesis absent.