Skip to content

Commit

Permalink
Check the git error message in a case-insensitive way (#274)
Browse files Browse the repository at this point in the history
With
git/git@244001a,
the error message has been changed. Follow up with this change.
  • Loading branch information
draftcode authored May 8, 2024
1 parent ea862e1 commit cd6a3f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/git/rebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ func parseRebaseResult(opts RebaseOpts, out *Output) (*RebaseResult, error) {
}

var status RebaseStatus
lowerStderr := strings.ToLower(stderr)
switch {
case strings.Contains(stderr, "No rebase in progress"):
case strings.Contains(lowerStderr, "no rebase in progress"):
status = RebaseNotInProgress
case strings.Contains(stderr, "Could not apply"):
case strings.Contains(lowerStderr, "could not apply"):
status = RebaseConflict
default:
logrus.WithField("exit_code", out.ExitCode).
Expand Down

0 comments on commit cd6a3f4

Please sign in to comment.