File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/core/src/shared/utilities Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { GitExtension } from '../extensions/git'
1111import { Settings } from '../settings'
1212import { getLogger } from '../logger/logger'
1313import { mergeResolvedShellPath } from '../env/resolveEnv'
14+ import { Timeout } from './timeoutUtils'
1415
1516/** Full path to VSCode CLI. */
1617let vscPath : string
@@ -32,9 +33,13 @@ export async function tryRun(
3233 p : string ,
3334 args : string [ ] ,
3435 logging : 'yes' | 'no' | 'noresult' = 'yes' ,
36+ timeout ?: Timeout ,
3537 expected ?: string ,
3638 opt ?: ChildProcessOptions
3739) : Promise < boolean > {
40+ timeout ?. onCompletion ( ( ) => {
41+ throw new Error ( `tryRun timed out: ${ p } ${ args . join ( ' ' ) } ` )
42+ } )
3843 const proc = new ChildProcess ( p , args , { logging : 'no' } )
3944 const r = await proc . run ( {
4045 ...opt ,
You can’t perform that action at this time.
0 commit comments