@@ -247,7 +247,8 @@ suite('Resolver Utils', () => {
247247
248248 test ( 'resolveEnv (Windows)' , async ( ) => {
249249 sinon . stub ( platformApis , 'getOSType' ) . callsFake ( ( ) => platformApis . OSType . Windows ) ;
250- sinon . stub ( externalDependencies , 'exec' ) . callsFake ( async ( command : string , args : string [ ] ) => {
250+ sinon . stub ( externalDependencies , 'shellExecute' ) . callsFake ( async ( quoted : string ) => {
251+ const [ command , ...args ] = quoted . split ( ' ' ) ;
251252 if ( command === 'conda' && args [ 0 ] === 'info' && args [ 1 ] === '--json' ) {
252253 return { stdout : JSON . stringify ( condaInfo ( condaPrefixWindows ) ) } ;
253254 }
@@ -262,7 +263,8 @@ suite('Resolver Utils', () => {
262263
263264 test ( 'resolveEnv (non-Windows)' , async ( ) => {
264265 sinon . stub ( platformApis , 'getOSType' ) . callsFake ( ( ) => platformApis . OSType . Linux ) ;
265- sinon . stub ( externalDependencies , 'exec' ) . callsFake ( async ( command : string , args : string [ ] ) => {
266+ sinon . stub ( externalDependencies , 'shellExecute' ) . callsFake ( async ( quoted : string ) => {
267+ const [ command , ...args ] = quoted . split ( ' ' ) ;
266268 if ( command === 'conda' && args [ 0 ] === 'info' && args [ 1 ] === '--json' ) {
267269 return { stdout : JSON . stringify ( condaInfo ( condaPrefixNonWindows ) ) } ;
268270 }
@@ -280,7 +282,7 @@ suite('Resolver Utils', () => {
280282
281283 test ( 'resolveEnv: If no conda binary found, resolve as a simple environment' , async ( ) => {
282284 sinon . stub ( platformApis , 'getOSType' ) . callsFake ( ( ) => platformApis . OSType . Windows ) ;
283- sinon . stub ( externalDependencies , 'exec ' ) . callsFake ( async ( command : string ) => {
285+ sinon . stub ( externalDependencies , 'shellExecute ' ) . callsFake ( async ( command : string ) => {
284286 throw new Error ( `${ command } is missing or is not executable` ) ;
285287 } ) ;
286288 const actual = await resolveBasicEnv ( {
@@ -603,7 +605,7 @@ suite('Resolver Utils', () => {
603605 } ) ;
604606
605607 test ( 'If data provided by registry is less informative than kind resolvers, do not use it to update environment' , async ( ) => {
606- sinon . stub ( externalDependencies , 'exec ' ) . callsFake ( async ( command : string ) => {
608+ sinon . stub ( externalDependencies , 'shellExecute ' ) . callsFake ( async ( command : string ) => {
607609 throw new Error ( `${ command } is missing or is not executable` ) ;
608610 } ) ;
609611 const interpreterPath = path . join ( regTestRoot , 'conda3' , 'python.exe' ) ;
0 commit comments