substituted which with command -v.
Change which test for cmake28 to use command -v.