@@ -25,6 +25,7 @@ var exec = require( 'child_process' ).exec;
2525var tape = require ( 'tape' ) ;
2626var IS_BROWSER = require ( '@stdlib/assert/is-browser' ) ;
2727var IS_WINDOWS = require ( '@stdlib/assert/is-windows' ) ;
28+ var EXEC_PATH = require ( '@stdlib/process/exec-path' ) ;
2829var replace = require ( '@stdlib/string/replace' ) ;
2930var readFileSync = require ( '@stdlib/fs/read-file' ) . sync ;
3031
@@ -57,7 +58,7 @@ tape( 'when invoked with a `--help` flag, the command-line interface prints the
5758 'encoding' : 'utf8'
5859 } ) ;
5960 cmd = [
60- process . execPath ,
61+ EXEC_PATH ,
6162 fpath ,
6263 '--help'
6364 ] ;
@@ -83,7 +84,7 @@ tape( 'when invoked with a `-h` flag, the command-line interface prints the help
8384 'encoding' : 'utf8'
8485 } ) ;
8586 cmd = [
86- process . execPath ,
87+ EXEC_PATH ,
8788 fpath ,
8889 '-h'
8990 ] ;
@@ -103,7 +104,7 @@ tape( 'when invoked with a `-h` flag, the command-line interface prints the help
103104
104105tape ( 'when invoked with a `--version` flag, the command-line interface prints the version to `stderr`' , opts , function test ( t ) {
105106 var cmd = [
106- process . execPath ,
107+ EXEC_PATH ,
107108 fpath ,
108109 '--version'
109110 ] ;
@@ -123,7 +124,7 @@ tape( 'when invoked with a `--version` flag, the command-line interface prints t
123124
124125tape ( 'when invoked with a `-V` flag, the command-line interface prints the version to `stderr`' , opts , function test ( t ) {
125126 var cmd = [
126- process . execPath ,
127+ EXEC_PATH ,
127128 fpath ,
128129 '-V'
129130 ] ;
@@ -143,7 +144,7 @@ tape( 'when invoked with a `-V` flag, the command-line interface prints the vers
143144
144145tape ( 'the command-line interface encrypts and prints a text using an (alleged) RC4 cypher' , opts , function test ( t ) {
145146 var cmd = [
146- process . execPath ,
147+ EXEC_PATH ,
147148 '-e' ,
148149 '"process.stdin.isTTY = true; process.argv[ 2 ] = \'beep boop\'; process.argv[ 3 ] = \'--key=pwd12\'; require( \'' + fpath + '\' );"'
149150 ] ;
@@ -165,11 +166,11 @@ tape( 'the command-line interface supports use as a standard stream', opts, func
165166 var cmd = [
166167 'printf "beep\nboop\nboop"' ,
167168 '|' ,
168- process . execPath ,
169+ EXEC_PATH ,
169170 fpath ,
170171 '--key pwd12' ,
171172 '|' ,
172- process . execPath ,
173+ EXEC_PATH ,
173174 fpath ,
174175 '--key pwd12'
175176 ] ;
@@ -200,7 +201,7 @@ tape( 'when used as a standard stream, if an error is encountered when reading f
200201 script = replace ( script , '\'' , '"' ) ;
201202
202203 cmd = [
203- process . execPath ,
204+ EXEC_PATH ,
204205 '-e' ,
205206 '\'' + script + '\''
206207 ] ;
0 commit comments