-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
When loading a reporter, look for a color-version of this.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ var createErrorFormatter = function (basePath, emitter, SourceMapConsumer) { | |
original.line, original.column) | ||
} catch (e) { | ||
log.warn('SourceMap position not found for trace: %s', msg) | ||
// Fall back to non-source-mapped formatting. | ||
// Fall back to non-source-mapped formatting. | ||
} | ||
} | ||
|
||
|
@@ -103,6 +103,7 @@ var createReporters = function (names, config, emitter, injector) { | |
} | ||
|
||
try { | ||
log.debug('Trying to load reporter: %s', name) | ||
reporters.push(injector.createChild([locals], ['reporter:' + name]).get('reporter:' + name)) | ||
} catch (e) { | ||
if (e.message.indexOf('No provider for "reporter:' + name + '"') !== -1) { | ||
|
@@ -111,6 +112,17 @@ var createReporters = function (names, config, emitter, injector) { | |
} else { | ||
log.warn('Can not load "%s"!\n ' + e.stack, name) | ||
} | ||
return | ||
} | ||
var color_name = name + '_color' | ||
if (names.indexOf(color_name) !== -1) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
budde377
Author
Member
|
||
return | ||
} | ||
try { | ||
log.debug('Trying to load color-version of reporter: %s (%s)', name, color_name) | ||
reporters.push(injector.createChild([locals], ['reporter:' + name + '_color']).get('reporter:' + name)) | ||
} catch (e) { | ||
log.debug('Couldn\'t load color-version.') | ||
} | ||
}) | ||
|
||
|
@budde377 should this be
=== -1
? I'm seeing this in the logs: