Skip to content

Commit

Permalink
fix: Handle absolute outputFile paths in Junit Reporter
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vermeeca committed Mar 3, 2016
1 parent 28bc4e8 commit d5dc808
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -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)
Expand Down

1 comment on commit d5dc808

@carljm
Copy link

@carljm carljm commented on d5dc808 Mar 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit breaks junit-reporter if outputFile is not defined, which is documented as allowed. Filed #87.

Please sign in to comment.