# File lib/rye/cmd.rb, line 274 274: def file_exists?(path) 275: begin 276: ret = self.quietly { ls(path) } 277: rescue Rye::Err => ex 278: ret = ex.rap 279: end 280: # "ls" returns a 0 exit code regardless of success in Linux 281: # But on OSX exit code is 1. This is why we look at STDERR. 282: !(ret.exit_status > 0) || ret.stderr.empty? 283: end