I am trying to write a script which automatically checks out or updates a Subversion URL based on whether a specified directory exists or not.
For some reason, my code isn't working and always returns true even if it's false:
def directory_exists?(directory)
return false if Dir[directory] == nil
true
end
What am I doing wrong?