What am I doing wrong? This should work, yes? Also, I think I'm missing an easier way to check for the presence of git. Ideas?

Shoes.app do
  ENV['PATH'].split(':').reverse.each do |path|
    cmd_with_path = "#{path}/git-rev-list"
    if File.exists? cmd_with_path
      @git_rev_list = cmd_with_path
    end
  end

  if @git_rev_list.nil?
    @git_rev_list = ask "I couldn't find git. Do you know where it is?"
  end

  stack do
    para "Your git-rev-list command is: [EMAIL PROTECTED]"
  end
end

Any/all help appreciated!

Cheers,

Josh

Reply via email to