Fix runtime finding in v2 endpoint

This commit is contained in:
Omar Brikaa 2022-05-02 21:16:25 +02:00
parent e767a6eafc
commit d33e47e60a
1 changed files with 5 additions and 2 deletions

View File

@ -50,6 +50,7 @@ const SIGNALS = [
function get_job(job_info, available_runtimes) {
let {
language,
version,
args,
stdin,
files,
@ -79,8 +80,10 @@ function get_job(job_info, available_runtimes) {
}
}
const rt = available_runtimes.find(rt =>
[...rt.aliases, rt.language].includes(rt.language)
const rt = available_runtimes.find(
rt =>
[...rt.aliases, rt.language].includes(language) &&
(version === rt.version || version === '*')
);
if (rt === undefined) {