fix a bug in the jstcss guard

test plan:
with guard running:
edit a handlebars file that has a corresponding
sass file.
e.g.: app/views/jst/FolderTreeItem.handlebars

it should not crash guard

Change-Id: Icd04510dc4ac0ff80674d1b3116da0dccb199fd9
Reviewed-on: https://gerrit.instructure.com/41019
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
Ryan Shaw 2014-09-11 12:52:33 -06:00
parent ab6433ddb2
commit 216cd43685
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ module Guard
end
def touch_handlebars_file(sass_path)
hbs_path = path.sub('stylesheets', 'views').sub(/\.([^\.]*)\z/, '.handlebars')
hbs_path = sass_path.sub('stylesheets', 'views').sub(/\.([^\.]*)\z/, '.handlebars')
FileUtils.touch(hbs_path) if File.exist?(hbs_path)
end