Permalink
Browse files

Simplify Configuration#save_config.

  • Loading branch information...
1 parent 3dffd72 commit e8c1bf27dec81f0067e22f03f40a06905e842c20 @trans trans committed Dec 21, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/setup/configuration.rb
@@ -595,8 +595,9 @@ def to_yaml(*args)
# Save configuration.
def save_config
out = to_yaml
- if not File.exist?(File.dirname(CONFIG_FILE))
- FileUtils.mkdir_p(File.dirname(CONFIG_FILE))
+ dir = File.dirname(CONFIG_FILE)
+ unless File.exist?(dir)
+ FileUtils.mkdir_p(dir)
end
if File.exist?(CONFIG_FILE)
txt = File.read(CONFIG_FILE)

0 comments on commit e8c1bf2

Please sign in to comment.