diff --git a/internal/runners/revert/revert.go b/internal/runners/revert/revert.go index 01d8d91225..16a04b13f2 100644 --- a/internal/runners/revert/revert.go +++ b/internal/runners/revert/revert.go @@ -1,6 +1,8 @@ package revert import ( + "strings" + "github.com/ActiveState/cli/internal/analytics" "github.com/ActiveState/cli/internal/errs" "github.com/ActiveState/cli/internal/locale" @@ -63,14 +65,14 @@ func (r *Revert) Run(params *Params) (rerr error) { } commitID := params.CommitID - if !strfmt.IsUUID(commitID) && commitID != headCommitID { + if !strfmt.IsUUID(commitID) && !strings.EqualFold(commitID, headCommitID) { return locale.NewInputError("err_invalid_commit_id", "Invalid commit ID") } latestCommit, err := commitmediator.Get(r.project) if err != nil { return errs.Wrap(err, "Unable to get local commit") } - if commitID == headCommitID { + if strings.EqualFold(commitID, headCommitID) { commitID = latestCommit.String() }