ryanb / ruby-warrior

Game written in Ruby for learning Ruby.
MIT License
3.83k stars 838 forks source link

Error if custom directory doesn't exist #55

Open lstejskal opened 12 years ago

lstejskal commented 12 years ago

If I want to use non-existent custom directory for rubywarrior data using -d parameter, game offers me to create rubywarrior subdirectory under it and then crashes because the custom directory doesn't exist.

Example:

rubywarrior -dnodir
No rubywarrior directory found, would you like to create one? [yn] y
lib/ruby_warrior/game.rb:29:in `mkdir': No such file or directory - nodir/rubywarrior (Errno::ENOENT)

IMHO game should offer to create custom directory before creating rubywarrior directory.