Fix an issue reported by rubocop that wasn't ignored in the todo config

Issue text: Favor modifier if/unless usage when you have a single-line body.
This commit is contained in:
Nicolas McCurdy
2014-01-04 20:39:44 -05:00
parent e202b7eae7
commit f03e7670cf
3 changed files with 4 additions and 13 deletions

View File

@@ -31,9 +31,7 @@ class Homesick < Thor
destination = nil
if File.exist?(uri)
uri = Pathname.new(uri).expand_path
if uri.to_s.start_with?(repos_dir.to_s)
raise "Castle already cloned to #{uri}"
end
raise "Castle already cloned to #{uri}" if uri.to_s.start_with?(repos_dir.to_s)
destination = uri.basename