Skip to content

Commit

Permalink
Fix log messages (#152)
Browse files Browse the repository at this point in the history
Signed-off-by: Reinhard Nägele <[email protected]>
  • Loading branch information
unguiculus authored Apr 25, 2019
1 parent f1712a6 commit e2e0c8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/chart/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (t *Testing) processCharts(action func(chart *Chart) TestResult) ([]TestRes
return results, nil
}

charts := []*Chart{}
var charts []*Chart
for _, dir := range chartDirs {
chart, err := NewChart(dir)
if err != nil {
Expand Down Expand Up @@ -647,7 +647,7 @@ func (t *Testing) FindChartDirsToBeProcessed() ([]string, error) {
func (t *Testing) computeMergeBase() (string, error) {
err := t.git.ValidateRepository()
if err != nil {
return "", fmt.Errorf("Must be in a git repository")
return "", errors.New("Must be in a git repository")
}
return t.git.MergeBase(fmt.Sprintf("%s/%s", t.config.Remote, t.config.TargetBranch), "HEAD")
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/tool/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ func (g Git) GetUrlForRemote(remote string) (string, error) {
}

func (g Git) ValidateRepository() error {
return g.exec.RunProcess("git", "rev-parse", "--is-inside-work-tree")
_, err := g.exec.RunProcessAndCaptureOutput("git", "rev-parse", "--is-inside-work-tree")
return err
}

0 comments on commit e2e0c8c

Please sign in to comment.