Kind of. So are you suggesting something as follows:

    def find_bin(bin_path, bin)
      exe = File.join(bin_path, bin)
      return exe if File.exists?(exe)
      program = which([bin])
      return program unless program == bin

      fail "Unable to find #{bin} in either #{bin_path} or system PATH"
    end