Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix log messages #152

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
unguiculus marked this conversation as resolved.
Show resolved Hide resolved
}