aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/lib/spawn_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/tasks/lib/spawn_test.js')
-rw-r--r--build/tasks/lib/spawn_test.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/build/tasks/lib/spawn_test.js b/build/tasks/lib/spawn_test.js
index 34353a783..146155411 100644
--- a/build/tasks/lib/spawn_test.js
+++ b/build/tasks/lib/spawn_test.js
@@ -3,11 +3,13 @@
// Run Node with provided parameters: the first one being the Grunt
// done function and latter ones being files to be tested.
// See the comment in ../node_smoke_tests.js for more information.
-module.exports = function spawnTest( done ) {
- var testPaths = [].slice.call( arguments, 1 ),
- spawn = require( "cross-spawn" );
+module.exports = function spawnTest( done, command ) {
+ var spawn = require( "child_process" ).spawn;
- spawn( "node", testPaths, { stdio: "inherit" } )
+ spawn( command, {
+ stdio: "inherit",
+ shell: true
+ } )
.on( "close", function( code ) {
done( code === 0 );
} );