From 67b201e7c5c77421105072f0d1ee89b531750af2 Mon Sep 17 00:00:00 2001 From: Baumgartner Marcel Date: Thu, 6 Jun 2024 12:41:04 +0200 Subject: [PATCH] Add check for existing /bin path in entrypoint --- Moonlight/Features/Servers/Helpers/ImageConversionHelper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Moonlight/Features/Servers/Helpers/ImageConversionHelper.cs b/Moonlight/Features/Servers/Helpers/ImageConversionHelper.cs index 23c3f0db..2bfb0df2 100644 --- a/Moonlight/Features/Servers/Helpers/ImageConversionHelper.cs +++ b/Moonlight/Features/Servers/Helpers/ImageConversionHelper.cs @@ -357,7 +357,8 @@ public class ImageConversionHelper // Installation var installation = egg["scripts"]?["installation"] ?? JObject.Parse("{}"); - result.InstallShell = "/bin/" + installation.Value("entrypoint") ?? "Install shell was missing"; + var entrypoint = installation.Value("entrypoint") ?? "Install shell was missing"; + result.InstallShell = entrypoint.StartsWith("/bin/") ? entrypoint : "/bin/" + entrypoint; result.InstallScript = installation.Value("script") ?? "Install script was missing"; result.InstallDockerImage = installation.Value("container") ?? "Install container was missing";