From cc421b69f2eb06baaea74d6ad4969cb1e17deab5 Mon Sep 17 00:00:00 2001 From: mmokijew Date: Mon, 29 Jan 2024 08:24:05 +0100 Subject: [PATCH] edit error message --- server/events/pending_plan_finder.go | 4 ++-- server/events/pending_plan_finder_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/events/pending_plan_finder.go b/server/events/pending_plan_finder.go index 5448537883..72a4f2742f 100644 --- a/server/events/pending_plan_finder.go +++ b/server/events/pending_plan_finder.go @@ -58,8 +58,8 @@ func (p *DefaultPendingPlanFinder) findWithAbsPaths(pullDir string) ([]PendingPl lsCmd.Dir = repoDir lsOut, err := lsCmd.CombinedOutput() if err != nil { - return nil, nil, errors.Wrapf(err, "Error running 'git ls-files . "+ - "--others' in '%s' directory: %s", repoDir, string(lsOut)) + return nil, nil, errors.Wrapf(err, "running 'git ls-files . --others' in '%s' directory: %s", + repoDir, string(lsOut)) } for _, file := range strings.Split(string(lsOut), "\n") { if filepath.Ext(file) == ".tfplan" { diff --git a/server/events/pending_plan_finder_test.go b/server/events/pending_plan_finder_test.go index 4de1328223..7319e71f1a 100644 --- a/server/events/pending_plan_finder_test.go +++ b/server/events/pending_plan_finder_test.go @@ -37,7 +37,7 @@ func TestPendingPlanFinder_FindIncludingNotGitDir(t *testing.T) { pf := &events.DefaultPendingPlanFinder{} _, err := pf.Find(tmpDir) - ErrEquals(t, fmt.Sprintf("Error running 'git ls-files . --others' in '%s/%s' directory: fatal: "+ + ErrEquals(t, fmt.Sprintf("running 'git ls-files . --others' in '%s/%s' directory: fatal: "+ "not a git repository (or any of the parent directories): .git\n: exit status 128", tmpDir, notGitDirName), err) }