From 54b03e66506cfa9e0fa82fef4d3cff44377bded7 Mon Sep 17 00:00:00 2001 From: Andreas Lubbe Date: Mon, 12 Dec 2016 20:20:09 +0100 Subject: [PATCH] Do not add --jar if JAR_PATH is empty --- lib/node/closure-compiler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/node/closure-compiler.js b/lib/node/closure-compiler.js index 379253bd..4f041658 100644 --- a/lib/node/closure-compiler.js +++ b/lib/node/closure-compiler.js @@ -36,7 +36,9 @@ var contribPath = path.dirname(compilerPath) + '/contrib'; function Compiler(args, extraCommandArgs) { this.commandArguments = (extraCommandArgs || []).slice(); - this.commandArguments.push('-jar', Compiler.JAR_PATH); + if (Compiler.JAR_PATH) { + this.commandArguments.push('-jar', Compiler.JAR_PATH); + } if (Array.isArray(args)) { this.commandArguments = this.commandArguments.concat(args.slice());