Skip to content

Commit da744f2

Browse files
committed
Check if shield exsists
1 parent 5c09662 commit da744f2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/badge/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Badge
22

3-
VERSION = "0.8.2"
3+
VERSION = "0.8.3"
44
DESCRIPTION = "Add a badge overlay to your app icon"
55

66
def self.root

lib/badge/runner.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ def run(path, options)
7777
UI.message "Did nothing... Enable --verbose for more info.".red
7878
end
7979

80-
File.delete(shield) if File.exist?(shield)
81-
File.delete("#{shield.path}.png") if File.exist?("#{shield.path}.png")
80+
if shield
81+
File.delete(shield) if File.exist?(shield)
82+
File.delete("#{shield.path}.png") if File.exist?("#{shield.path}.png")
83+
end
84+
8285
else
8386
UI.error "Could not find any app icons...".red
8487
end

0 commit comments

Comments
 (0)