FIX: Only delete theme folder if it has been created
If an exception is raised before the folder is created, then this `ensure` block is still run
This commit is contained in:
parent
148bfc9be5
commit
105359e54a
|
@ -44,7 +44,7 @@ class ThemeStore::GitImporter
|
|||
return Discourse::Utils.execute_command("git", "diff", "--staged")
|
||||
end
|
||||
ensure
|
||||
FileUtils.rm_rf local_temp_folder
|
||||
FileUtils.rm_rf local_temp_folder if local_temp_folder
|
||||
end
|
||||
|
||||
def commits_since(hash)
|
||||
|
|
Loading…
Reference in New Issue