From b8a96071a82c1f0235b1e9d18dde6b62b015ebed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Mon, 9 Sep 2024 14:43:37 +0200 Subject: [PATCH] docker/install: Handle missing `v` prefix when searching GH release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- src/docker/install.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/docker/install.ts b/src/docker/install.ts index 7664972..1c35589 100644 --- a/src/docker/install.ts +++ b/src/docker/install.ts @@ -594,7 +594,10 @@ EOF`, } const releases = >JSON.parse(body); if (!releases[version]) { - throw new Error(`Cannot find Docker release ${version} in ${url}`); + if (!releases['v' + version]) { + throw new Error(`Cannot find Docker release ${version} in ${url}`); + } + return releases['v' + version]; } return releases[version]; }