Fix latexmk version checking

This commit is contained in:
James Allen 2014-02-22 14:08:49 +00:00
parent 20f9d9f94a
commit a6b08939cd

View file

@ -161,7 +161,7 @@ module.exports = (grunt) ->
checkLatexmk: (callback = (error) ->) -> checkLatexmk: (callback = (error) ->) ->
grunt.log.write "Checking latexmk is installed... " grunt.log.write "Checking latexmk is installed... "
exec "latexmk -version", (error, stdout, stderr) -> exec "latexmk --version", (error, stdout, stderr) ->
if error? and error.message.match("command not found") if error? and error.message.match("command not found")
grunt.log.error "FAIL." grunt.log.error "FAIL."
grunt.log.errorlns """ grunt.log.errorlns """
@ -179,7 +179,7 @@ module.exports = (grunt) ->
grunt.log.error "Unknown latexmk version" grunt.log.error "Unknown latexmk version"
else else
version = m[1] version = m[1]
if semver.gt(version + ".0", "4.39.0") if semver.gte(version + ".0", "4.39.0")
grunt.log.writeln "OK." grunt.log.writeln "OK."
grunt.log.writeln "Running latexmk version #{version}" grunt.log.writeln "Running latexmk version #{version}"
else else