File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 33'use strict' ;
44
55var path = require ( 'path' ) ;
6- var execFile = require ( 'child_process' ) . execFile ;
6+ var spawn = require ( 'child_process' ) . spawn ;
77
88var exe_ext = process . platform === 'win32' ? '.exe' : '' ;
99
1010var protoc = path . resolve ( __dirname , 'protoc-gen-protolint' + exe_ext ) ;
1111
1212var args = process . argv . slice ( 2 ) ;
1313
14- var child_process = execFile ( protoc , args , null ) ;
15-
16- child_process . stdout . pipe ( process . stdout ) ;
17- child_process . stderr . pipe ( process . stderr ) ;
14+ var child_process = spawn ( protoc , args , {
15+ stdio : 'inherit' // This inherits stdin, stdout, and stderr
16+ } ) ;
1817
1918child_process . on ( "exit" , ( exit_code , _ ) => {
2019 process . exit ( exit_code ) ;
Original file line number Diff line number Diff line change 33'use strict' ;
44
55var path = require ( 'path' ) ;
6- var execFile = require ( 'child_process' ) . execFile ;
6+ var spawn = require ( 'child_process' ) . spawn ;
77
88var exe_ext = process . platform === 'win32' ? '.exe' : '' ;
99
1010var protoc = path . resolve ( __dirname , 'protolint' + exe_ext ) ;
1111
1212var args = process . argv . slice ( 2 ) ;
1313
14- var child_process = execFile ( protoc , args , null ) ;
15-
16- child_process . stdout . pipe ( process . stdout ) ;
17- child_process . stderr . pipe ( process . stderr ) ;
14+ var child_process = spawn ( protoc , args , {
15+ stdio : 'inherit' // This inherits stdin, stdout, and stderr
16+ } ) ;
1817
1918child_process . on ( "exit" , ( exit_code , _ ) => {
2019 process . exit ( exit_code ) ;
2120} ) ;
22-
You can’t perform that action at this time.
0 commit comments