Skip to content

Commit

Permalink
Use spawn instead of exec
Browse files Browse the repository at this point in the history
  • Loading branch information
valscion committed Oct 7, 2021
1 parent ce49c24 commit 55f3478
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/dev-server.js
@@ -1,5 +1,5 @@
const fs = require('fs');
const {exec} = require('child_process');
const {spawn} = require('child_process');

const del = require('del');

Expand All @@ -17,7 +17,7 @@ describe('Webpack Dev Server', function () {
it('should save report file to the output directory', function (done) {
const startedAt = Date.now();

const devServer = exec(`${__dirname}/../node_modules/.bin/webpack-dev-server --config ${WEBPACK_CONFIG_PATH}`, {
const devServer = spawn(`${__dirname}/../node_modules/.bin/webpack-dev-server`, ['--config', WEBPACK_CONFIG_PATH], {
cwd: ROOT
});

Expand Down

0 comments on commit 55f3478

Please sign in to comment.