[rake] Raise error if cleaning does not succeed.

Fixes https://hipbyte.freshdesk.com/helpdesk/tickets/1359.
This commit is contained in:
Eloy Durán
2013-11-18 11:44:07 +01:00
parent de38ba1086
commit 99df3e011b
3 changed files with 15 additions and 4 deletions

View File

@@ -52,6 +52,11 @@ module Motion; module Project;
if File.exist?(build_dir)
App.info 'Delete', build_dir
FileUtils.rm_rf build_dir
if File.exist?(build_dir)
# It can happen that because of file permissions a dir/file is not
# actually removed, which can lead to confusing issues.
App.fail "Failed to remove `#{build_dir}'. Please remove this path manually."
end
end
end
end