I am trying to write a script which automatically checks out or updates a subverion url based on whether a specified directory exists or not, but from some reason, my code isnt working and always returns 'true' even if its false.
The code:
def directory_exists?(directory)
return false if Dir[directory] == nil
true
end
Can someone help me? What am I doing wrong?