From d5dc8081409f467d125cfdb149b1a1a61b1f0a4a Mon Sep 17 00:00:00 2001 From: Craig Vermeer Date: Thu, 3 Mar 2016 10:00:49 -0500 Subject: [PATCH] fix: Handle absolute outputFile paths in Junit Reporter Modifies the Junit Reporter so that it doesn't try to combine the output directory path and the output file, if the output file is already an absolute path Closes #83 --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 49764cd..767646d 100644 --- a/index.js +++ b/index.js @@ -52,7 +52,9 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for var writeXmlForBrowser = function (browser) { var safeBrowserName = browser.name.replace(/ /g, '_') var newOutputFile - if (outputFile != null) { + if (path.isAbsolute(outputFile)) { + newOutputFile = outputFile + } else if (outputFile != null) { var dir = useBrowserName ? path.join(outputDir, safeBrowserName) : outputDir newOutputFile = path.join(dir, outputFile)