From 5e72521e568b850dc53721213c17aaa9427a492f Mon Sep 17 00:00:00 2001 From: Dorin Geman Date: Thu, 24 Jul 2025 16:07:45 +0300 Subject: [PATCH] context: fix Docker Desktop detection from within WSL2 Signed-off-by: Dorin Geman --- desktop/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/context.go b/desktop/context.go index aa70d837..ddfd411b 100644 --- a/desktop/context.go +++ b/desktop/context.go @@ -33,7 +33,7 @@ func isDesktopContext(ctx context.Context, cli *command.DockerCli) bool { if strings.Contains(serverInfo.KernelVersion, "-microsoft-standard-WSL2") { // We can use Docker Desktop from within a WSL2 integrated distro. // https://github.com/search?q=repo%3Amicrosoft%2FWSL2-Linux-Kernel+path%3A%2F%5Earch%5C%2F.*%5C%2Fconfigs%5C%2Fconfig-wsl%2F+CONFIG_LOCALVERSION&type=code - return true + return serverInfo.OperatingSystem == "Docker Desktop" } return false }