@@ -22,6 +22,7 @@ import {
2222import { logProcess } from './logger.node' ;
2323import { noop } from '../utils/misc' ;
2424import { dispose } from '../utils/lifecycle' ;
25+ import { fileToCommandArgument } from '../helpers' ;
2526
2627export class BufferDecoder implements IBufferDecoder {
2728 public decode ( buffers : Buffer [ ] ) : string {
@@ -80,7 +81,7 @@ export class ProcessService implements IProcessService {
8081
8182 public execObservable ( file : string , args : string [ ] , options : SpawnOptions = { } ) : ObservableExecutionResult < string > {
8283 const spawnOptions = this . getDefaultOptions ( options ) ;
83- const proc = spawn ( file , args , spawnOptions ) ;
84+ const proc = spawn ( fileToCommandArgument ( file ) , args , spawnOptions ) ;
8485 let procExited = false ;
8586 logger . ci ( `Exec observable ${ file } , ${ args . join ( ' ' ) } ` ) ;
8687 const disposables : IDisposable [ ] = [ ] ;
@@ -155,7 +156,7 @@ export class ProcessService implements IProcessService {
155156 }
156157 public exec ( file : string , args : string [ ] , options : SpawnOptions = { } ) : Promise < ExecutionResult < string > > {
157158 const spawnOptions = this . getDefaultOptions ( options ) ;
158- const proc = spawn ( file , args , spawnOptions ) ;
159+ const proc = spawn ( fileToCommandArgument ( file ) , args , spawnOptions ) ;
159160 const deferred = createDeferred < ExecutionResult < string > > ( ) ;
160161 const disposable : IDisposable = {
161162 dispose : ( ) => {
0 commit comments