Skip to content

Commit

Permalink
Raise error if custom badge image is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
koji-inoue committed Dec 26, 2017
1 parent cdf190d commit 4f5a136
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/badge/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ def run(path, options)
UI.verbose "Verbose active... VERSION: #{Badge::VERSION}".blue
UI.verbose "Parameters: #{options.values.inspect}".blue

if options[:custom] && !File.exist?(options[:custom])
UI.error("Could not find custom badge image")
UI.user_error!("Specify a valid custom badge image path!")
end

alpha_channel = false
if options[:alpha_channel]
alpha_channel = true
Expand Down

0 comments on commit 4f5a136

Please sign in to comment.