mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-23 11:36:10 +08:00
docker/install: Handle missing v
prefix when searching GH release
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
10424facaf
commit
b8a96071a8
@ -594,8 +594,11 @@ EOF`,
|
|||||||
}
|
}
|
||||||
const releases = <Record<string, GitHubRelease>>JSON.parse(body);
|
const releases = <Record<string, GitHubRelease>>JSON.parse(body);
|
||||||
if (!releases[version]) {
|
if (!releases[version]) {
|
||||||
|
if (!releases['v' + version]) {
|
||||||
throw new Error(`Cannot find Docker release ${version} in ${url}`);
|
throw new Error(`Cannot find Docker release ${version} in ${url}`);
|
||||||
}
|
}
|
||||||
|
return releases['v' + version];
|
||||||
|
}
|
||||||
return releases[version];
|
return releases[version];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user