Skip to content

Commit 51cc9d9

Browse files
committed
[TE-5578] Use Fprintln for unformatted base-branch warning
The base-branch resolution warning in `autoCollectGitMetadata` calls `fmt.Fprintf` but contains no formatting verbs, and embeds a trailing "\n" in the format string. That is exactly the shape `Fprintln` exists for: no verbs, implicit newline. Switch to `Fprintln` and drop the explicit "\n". Pure style change; no behaviour difference on stderr. Addresses review feedback on PR #480.
1 parent a780239 commit 51cc9d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/command/plan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ func autoCollectGitMetadata(ctx context.Context, cfg *config.Config, runner git.
168168
remote := cfg.Remote
169169
baseBranch, err := git.ResolveBaseBranch(ctx, runner, explicit, remote)
170170
if err != nil {
171-
fmt.Fprintf(os.Stderr, "Warning: could not resolve base branch for diff metadata. "+
172-
"Set --metadata base_branch=<branch> if your repo uses a non-standard default branch.\n")
171+
fmt.Fprintln(os.Stderr, "Warning: could not resolve base branch for diff metadata. "+
172+
"Set --metadata base_branch=<branch> if your repo uses a non-standard default branch.")
173173
} else {
174174
debug.Printf("auto-detected base branch: %s", baseBranch)
175175
}

0 commit comments

Comments
 (0)