From 394b23aa9b597dc2f81ebf8c2b7840f70f474a2d Mon Sep 17 00:00:00 2001 From: Hamish 'James' Coates <5133941+digitalfu@users.noreply.github.com> Date: Tue, 28 Feb 2023 00:53:25 +0000 Subject: [PATCH] Include new line after existing fork error log (#7030) --- pkg/cmd/repo/fork/fork.go | 2 +- pkg/cmd/repo/fork/fork_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/repo/fork/fork.go b/pkg/cmd/repo/fork/fork.go index 6b4c5ca9a..8334cf0e5 100644 --- a/pkg/cmd/repo/fork/fork.go +++ b/pkg/cmd/repo/fork/fork.go @@ -209,7 +209,7 @@ func forkRun(opts *ForkOptions) error { cs.Bold(ghrepo.FullName(forkedRepo)), "already exists") } else { - fmt.Fprintf(stderr, "%s already exists", ghrepo.FullName(forkedRepo)) + fmt.Fprintf(stderr, "%s already exists\n", ghrepo.FullName(forkedRepo)) } } else { if connectedToTerminal { diff --git a/pkg/cmd/repo/fork/fork_test.go b/pkg/cmd/repo/fork/fork_test.go index 5ec1c5f28..5833acb5d 100644 --- a/pkg/cmd/repo/fork/fork_test.go +++ b/pkg/cmd/repo/fork/fork_test.go @@ -407,7 +407,7 @@ func TestRepoFork(t *testing.T) { }, }, httpStubs: forkPost, - wantErrOut: "someone/REPO already exists", + wantErrOut: "someone/REPO already exists\n", }, { name: "implicit nontty --remote", @@ -560,7 +560,7 @@ func TestRepoFork(t *testing.T) { }, }, httpStubs: forkPost, - wantErrOut: "someone/REPO already exists", + wantErrOut: "someone/REPO already exists\n", }, { name: "repo arg nontty clone arg already exists", @@ -577,7 +577,7 @@ func TestRepoFork(t *testing.T) { cs.Register(`git -C REPO remote add upstream https://github\.com/OWNER/REPO\.git`, 0, "") cs.Register(`git -C REPO fetch upstream`, 0, "") }, - wantErrOut: "someone/REPO already exists", + wantErrOut: "someone/REPO already exists\n", }, { name: "repo arg nontty clone arg",