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';
7
7
import { spawnToResult , waitForExit } from '../process-management' ;
8
8
import { OVERRIDE_JAVA_AGENT } from './terminal/terminal-env-overrides' ;
9
9
import { reportError } from '../error-tracking' ;
10
- import { commandExists , delay } from '../util' ;
10
+ import { commandExists , delay , canAccess } from '../util' ;
11
11
12
12
type JvmTarget = { pid : string , name : string , interceptedByProxy : number | undefined } ;
13
13
@@ -56,7 +56,7 @@ const javaBinPromise: Promise<string | false> = (async () => {
56
56
57
57
// Try to use use Mac's java_home helper (available since 10.5 apparently)
58
58
async function getMacJavaHome ( ) {
59
- if ( ! await commandExists ( '/usr/libexec/java_home' ) ) return ;
59
+ if ( ! await canAccess ( '/usr/libexec/java_home' ) ) return ;
60
60
61
61
const result = await spawnToResult ( '/usr/libexec/java_home' , [ '-v' , '1.9+' ] ) ;
62
62
if ( result . exitCode != 0 ) return ;
You can’t perform that action at this time.
0 commit comments