Skip to content

Commit

Permalink
Check if shield exsists
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Mar 15, 2017
1 parent 5c09662 commit da744f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/badge/base.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Badge

VERSION = "0.8.2"
VERSION = "0.8.3"
DESCRIPTION = "Add a badge overlay to your app icon"

def self.root
Expand Down
7 changes: 5 additions & 2 deletions lib/badge/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ def run(path, options)
UI.message "Did nothing... Enable --verbose for more info.".red
end

File.delete(shield) if File.exist?(shield)
File.delete("#{shield.path}.png") if File.exist?("#{shield.path}.png")
if shield
File.delete(shield) if File.exist?(shield)
File.delete("#{shield.path}.png") if File.exist?("#{shield.path}.png")
end

else
UI.error "Could not find any app icons...".red
end
Expand Down

0 comments on commit da744f2

Please sign in to comment.