File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ def initialize(raw_options)
1313 @manifest = Fontcustom ::Manifest . new ( manifest , @options )
1414 end
1515
16+ def which
17+ if !Gem . win_platform?
18+ "which"
19+ else # on windows
20+ "where"
21+ end
22+ end
23+
1624 def compile
1725 current = checksum
1826 previous = @manifest . get ( :checksum ) [ :previous ]
@@ -31,18 +39,14 @@ def compile
3139 private
3240
3341 def check_fontforge
34- if !Gem . win_platform?
35- fontforge = `which fontforge`
36- else
37- fontforge = `where fontforge`
38- end
42+ fontforge = `#{ which } fontforge`
3943 if fontforge == "" || fontforge == "fontforge not found"
4044 raise Fontcustom ::Error , "Please install fontforge first. Visit <http://fontcustom.com> for instructions."
4145 end
4246 end
4347
4448 def check_woff2
45- woff2 = `which woff2_compress`
49+ woff2 = `#{ which } woff2_compress`
4650 if woff2 == "" || woff2 == "woff2_compress not found"
4751 fail Fontcustom ::Error , "Please install woff2 first. Visit <https://github.com/google/woff2> for instructions."
4852 end
You can’t perform that action at this time.
0 commit comments