File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { HtkConfig } from '../config';
77import { spawnToResult , waitForExit } from '../process-management' ;
88import { OVERRIDE_JAVA_AGENT } from './terminal/terminal-env-overrides' ;
99import { reportError } from '../error-tracking' ;
10- import { commandExists , delay } from '../util' ;
10+ import { commandExists , delay , canAccess } from '../util' ;
1111
1212type JvmTarget = { pid : string , name : string , interceptedByProxy : number | undefined } ;
1313
@@ -56,7 +56,7 @@ const javaBinPromise: Promise<string | false> = (async () => {
5656
5757// Try to use use Mac's java_home helper (available since 10.5 apparently)
5858async function getMacJavaHome ( ) {
59- if ( ! await commandExists ( '/usr/libexec/java_home' ) ) return ;
59+ if ( ! await canAccess ( '/usr/libexec/java_home' ) ) return ;
6060
6161 const result = await spawnToResult ( '/usr/libexec/java_home' , [ '-v' , '1.9+' ] ) ;
6262 if ( result . exitCode != 0 ) return ;
You can’t perform that action at this time.
0 commit comments