@@ -15,7 +15,6 @@ import * as _ from 'lodash';
1515import { EventEmitter , Event } from 'vscode' ;
1616import * as nls from 'vscode-nls' ;
1717import * as mime from 'mime' ;
18- import * as AutoDetectDecoderStream from 'autodetect-decoder-stream' ;
1918
2019const localize = nls . loadMessageBundle ( __filename ) ;
2120const readdir = denodeify ( fs . readdir ) ;
@@ -177,23 +176,20 @@ export async function exec(child: cp.ChildProcess, defaultEncoding = 'utf8'): Pr
177176 disposables . push ( toDisposable ( ( ) => ee . removeListener ( name , fn ) ) ) ;
178177 } ;
179178
180- const stdoutStream = child . stdout . pipe ( new AutoDetectDecoderStream ( { defaultEncoding } ) ) ;
181- const stderrStream = child . stderr . pipe ( new AutoDetectDecoderStream ( { defaultEncoding } ) ) ;
182-
183179 const [ exitCode , stdout , stderr ] = await Promise . all < any > ( [
184180 new Promise < number > ( ( c , e ) => {
185181 once ( child , 'error' , e ) ;
186182 once ( child , 'exit' , c ) ;
187183 } ) ,
188184 new Promise < string > ( c => {
189- let buffers : string [ ] = [ ] ;
190- on ( stdoutStream , 'data' , b => buffers . push ( b ) ) ;
191- once ( stdoutStream , 'close' , ( ) => c ( buffers . join ( ) ) ) ;
185+ const buffers : string [ ] = [ ] ;
186+ on ( child . stdout , 'data' , b => buffers . push ( b ) ) ;
187+ once ( child . stdout , 'close' , ( ) => c ( buffers . join ( ) ) ) ;
192188 } ) ,
193189 new Promise < string > ( c => {
194- let buffers : string [ ] = [ ] ;
195- on ( stderrStream , 'data' , b => buffers . push ( b ) ) ;
196- once ( stderrStream , 'close' , ( ) => c ( buffers . join ( ) ) ) ;
190+ const buffers : string [ ] = [ ] ;
191+ on ( child . stderr , 'data' , b => buffers . push ( b ) ) ;
192+ once ( child . stderr , 'close' , ( ) => c ( buffers . join ( ) ) ) ;
197193 } )
198194 ] ) ;
199195
@@ -457,6 +453,7 @@ export class Repository {
457453
458454 return await this . doBuffer ( object ) ;
459455
456+ // TODO@joao
460457 // return new Promise((c, e) => {
461458 // detectMimesFromStream(child.stdout, null, (err, result) => {
462459 // if (err) {
0 commit comments