Skip to content

Commit

Permalink
[GR-25764] VSCode: Extension Doesn't Detect gu on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbalek committed Aug 25, 2020
1 parent f11afb5 commit 21a2d0d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vscode/graalvm/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ export function random(low: number, high: number): number {
export function findExecutable(program: string, graalVMHome: string | undefined): string | undefined {
if (graalVMHome) {
let executablePath = path.join(graalVMHome, 'bin', program);
if (fs.existsSync(executablePath)) {
if (process.platform === 'win32') {
if (fs.existsSync(executablePath + '.cmd')) {
return executablePath + '.cmd';
}
if (fs.existsSync(executablePath + '.exe')) {
return executablePath + '.exe';
}
} else if (fs.existsSync(executablePath)) {
return executablePath;
}
}
Expand Down

0 comments on commit 21a2d0d

Please sign in to comment.