Skip to content

Commit 695558d

Browse files
Update runner to find correct versions
1 parent 2d8e942 commit 695558d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

client/src-electron/electron-main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ipcMain.handle('electronAPI', async (event, operation, ...args) => {
9595
case 'getJavas': {
9696
const output = []
9797
try {
98-
const jvms = whereIsIt.nodeFindJava(null, null, '1.8')
98+
const jvms = ['21', '23'].flatMap((v) => whereIsIt.nodeFindJava(null, null, v))
9999

100100
// Add 'auto' option
101101
output.push('Auto')
@@ -115,7 +115,7 @@ ipcMain.handle('electronAPI', async (event, operation, ...args) => {
115115
case 'getPythons': {
116116
const output = []
117117
try {
118-
const pythons = whereIsIt.nodeFindPython(null, null, null, null, null, null, null)
118+
const pythons = whereIsIt.nodeFindPython(3, 12, null, null, null, null, null)
119119

120120
for (const py of pythons) {
121121
const path = py.executable

client/src-tauri/src/main.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ async fn tauri_api(
7171
},
7272
"getJavas" => {
7373
let mut output = vec![];
74-
let jvms = where_is_it::java::run(where_is_it::java::MatchOptions {
75-
name: None,
76-
arch: None,
77-
version: Some(String::from("1.8"))
78-
});
74+
let mut jvms = vec![];
75+
for supported in ["21", "23"] {
76+
jvms.append(&mut where_is_it::java::run(where_is_it::java::MatchOptions {
77+
name: None,
78+
arch: None,
79+
version: Some(String::from(supported))
80+
}));
81+
}
7982

8083
// Add 'auto' option
8184
output.push(String::from("Auto"));
@@ -98,8 +101,8 @@ async fn tauri_api(
98101
"getPythons" => {
99102
let mut output = vec![];
100103
let pythons = where_is_it::python::run(where_is_it::python::MatchOptions {
101-
major: None,
102-
minor: None,
104+
major: Some(3),
105+
minor: Some(12),
103106
patch: None,
104107
pre: None,
105108
dev: None,

0 commit comments

Comments
 (0)