2222
2323var resolve = require ( 'path' ) . resolve ;
2424var exec = require ( 'child_process' ) . exec ;
25+ var execFile = require ( 'child_process' ) . execFile ;
2526var tape = require ( 'tape' ) ;
2627var IS_BROWSER = require ( '@stdlib/assert/is-browser' ) ;
2728var IS_WINDOWS = require ( '@stdlib/assert/is-windows' ) ;
@@ -62,7 +63,7 @@ tape( 'when invoked with a `--help` flag, the command-line interface prints the
6263 '--help'
6364 ] ;
6465
65- exec ( cmd . join ( ' ' ) , done ) ;
66+ execFile ( cmd [ 0 ] , cmd . slice ( 1 ) , done ) ;
6667
6768 function done ( error , stdout , stderr ) {
6869 if ( error ) {
@@ -88,7 +89,7 @@ tape( 'when invoked with a `-h` flag, the command-line interface prints the help
8889 '-h'
8990 ] ;
9091
91- exec ( cmd . join ( ' ' ) , done ) ;
92+ execFile ( cmd [ 0 ] , cmd . slice ( 1 ) , done ) ;
9293
9394 function done ( error , stdout , stderr ) {
9495 if ( error ) {
@@ -108,7 +109,7 @@ tape( 'when invoked with a `--version` flag, the command-line interface prints t
108109 '--version'
109110 ] ;
110111
111- exec ( cmd . join ( ' ' ) , done ) ;
112+ execFile ( cmd [ 0 ] , cmd . slice ( 1 ) , done ) ;
112113
113114 function done ( error , stdout , stderr ) {
114115 if ( error ) {
@@ -128,7 +129,7 @@ tape( 'when invoked with a `-V` flag, the command-line interface prints the vers
128129 '-V'
129130 ] ;
130131
131- exec ( cmd . join ( ' ' ) , done ) ;
132+ execFile ( cmd [ 0 ] , cmd . slice ( 1 ) , done ) ;
132133
133134 function done ( error , stdout , stderr ) {
134135 if ( error ) {
0 commit comments