Skip to content

Commit bd5c05f

Browse files
committed
Passing --color/--no-color to worker processes is unnecessary
1 parent 1f10a7c commit bd5c05f

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

lib/fork.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ module.exports = (file, opts, execArgv) => {
4141
...opts
4242
};
4343

44-
const args = [opts.chalkOptions.level === 0 ? '--no-color' : '--color'].concat(opts.workerArgv);
45-
46-
const subprocess = childProcess.fork(workerPath, args, {
44+
const subprocess = childProcess.fork(workerPath, opts.workerArgv, {
4745
cwd: opts.projectDir,
4846
silent: true,
4947
env: {NODE_ENV: 'test', ...process.env, ...opts.environmentVariables, AVA_PATH},

lib/worker/consume-argv.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/worker/subprocess.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
'use strict';
22
const currentlyUnhandled = require('currently-unhandled')();
33

4-
/* eslint-disable import/no-unassigned-import */
5-
require('./ensure-forked');
6-
require('./consume-argv');
7-
/* eslint-enable import/no-unassigned-import */
4+
require('./ensure-forked'); // eslint-disable-line import/no-unassigned-import
85

96
const ipc = require('./ipc');
107

0 commit comments

Comments
 (0)