55import assert from 'assert'
66import { createExecutableFile , createTestWorkspaceFolder , envWithNewPath , readEnv , setEnv } from '../../testUtil'
77import path from 'path'
8- import { ChildProcess } from '../../../shared/utilities/processUtils'
98import { fs } from '../../../shared'
109import { isWin } from '../../../shared/vscode/env'
10+ import { tryRun } from '../../../shared/utilities/pathFind'
1111
1212describe ( 'envWithNewPath' , function ( ) {
1313 it ( 'gives current path with new PATH' , function ( ) {
@@ -29,16 +29,13 @@ describe('writeEnv', function () {
2929} )
3030
3131describe ( 'createExecutableFile' , function ( ) {
32- it ( 'creates a file that can be executes in a child process ' , async function ( ) {
32+ it ( 'creates a file that can be executed ' , async function ( ) {
3333 const tempDir = await createTestWorkspaceFolder ( )
3434 const filePath = path . join ( tempDir . uri . fsPath , `exec${ isWin ( ) ? '.cmd' : '' } ` )
3535 await createExecutableFile ( filePath , '' )
3636
37- const proc = new ChildProcess ( filePath )
38- const result = await proc . run ( )
37+ const result = await tryRun ( filePath , [ ] , 'yes' )
3938 assert . ok ( result )
40- assert . ok ( result . exitCode === 0 )
41-
4239 await fs . delete ( tempDir . uri , { force : true , recursive : true } )
4340 } )
4441} )
0 commit comments