Skip to content

Commit

Permalink
Fix error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Lapeyre committed Dec 4, 2019
1 parent f9b2a9e commit 35bb663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/events/working_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (w *FileWorkspace) forceClone(log *logging.SimpleLogger,
sanitizedOutput := w.sanitizeGitCredentials(string(output), p.BaseRepo, headRepo)
// Git LFS may not be enabled on this repository or may not have been
// installed by the user.
if err != nil && !strings.Contains(err.Error(), "exited with 1:") {
if err != nil && err.(*exec.ExitError).ExitCode() != 1 {
sanitizedErrMsg := w.sanitizeGitCredentials(err.Error(), p.BaseRepo, headRepo)
return fmt.Errorf("running git lfs pull: %s: %s", sanitizedOutput, sanitizedErrMsg)
}
Expand Down

0 comments on commit 35bb663

Please sign in to comment.