From cc21e3efbe381086db7a5291c17611f77c16e69c Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Wed, 20 Nov 2019 15:17:55 +0100 Subject: [PATCH] Build: Clean up scripts/grunt/options/phantomjs.js (#20503) --- scripts/grunt/options/phantomjs.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/grunt/options/phantomjs.js b/scripts/grunt/options/phantomjs.js index 8c4e8dbd254..128628d0e46 100644 --- a/scripts/grunt/options/phantomjs.js +++ b/scripts/grunt/options/phantomjs.js @@ -2,7 +2,6 @@ module.exports = function(config,grunt) { 'use strict'; grunt.registerTask('phantomjs', 'Copy phantomjs binary to vendor/', function() { - var dest = './tools/phantomjs/phantomjs'; var confDir = './node_modules/phantomjs-prebuilt/lib/'; @@ -10,12 +9,10 @@ module.exports = function(config,grunt) { dest += ".exe"; } - src = config.phjs - - if (!src){ - var m=grunt.file.read(confDir+"location.js") - var src=/= \"([^\"]*)\"/.exec(m)[1]; - + var src = config.phjs; + if (!src) { + var m = grunt.file.read(confDir+"location.js"); + src = /= \"([^\"]*)\"/.exec(m)[1]; if (!grunt.file.isPathAbsolute(src)) { src = confDir+src; } @@ -32,6 +29,5 @@ module.exports = function(config,grunt) { grunt.verbose.writeln(err); grunt.fail.warn('No working Phantomjs binary available') } - }); };