Skip to content

Commit

Permalink
fix guard run_on_deletion issue
Browse files Browse the repository at this point in the history
use correct method name so guard doesn't die when a handlebars template is
removed

test plan:
1. start guard
2. create a handlebars template
3. confirm the .js file gets created
4. delete the template
5. confirm the .js file gets deleted
6. guard should not asplode

Change-Id: I58456ef9d7d4a9bdaffb8d61d39d7e22c42d8d1a
Reviewed-on: https://gerrit.instructure.com/20605
Tested-by: Jenkins <[email protected]>
Reviewed-by: Stanley Stuart <[email protected]>
Product-Review: Jon Jensen <[email protected]>
QA-Review: Jon Jensen <[email protected]>
  • Loading branch information
jenseng committed May 13, 2013
1 parent 92571ee commit 97e1783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guard/jst.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run_on_deletion(paths)
paths.each do |file|
javascript = file.sub(%r{\A#{Regexp.escape(@options[:input])}/(.*?)\.handlebars}, "#{@options[:output]}/\\1.js")
UI.info "Removing: #{javascript}"
File.remove(javascript) if File.exists?(javascript)
File.delete(javascript) if File.exists?(javascript)
end
end

Expand Down

0 comments on commit 97e1783

Please sign in to comment.