Skip to content

Commit

Permalink
edit error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mmokijew committed Jan 29, 2024
1 parent 4a8078c commit cc421b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/events/pending_plan_finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion server/events/pending_plan_finder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit cc421b6

Please sign in to comment.