From 341e70d1cd656709fe8ebb76ae2ee72cacd35aff Mon Sep 17 00:00:00 2001 From: Luca Stocchi <49404737+lstocchi@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:17:39 +0200 Subject: [PATCH] fix: add suggestion when WSL seems to require a reboot (#7007) Signed-off-by: lstocchi --- extensions/podman/src/podman-install.spec.ts | 4 ++++ extensions/podman/src/podman-install.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/extensions/podman/src/podman-install.spec.ts b/extensions/podman/src/podman-install.spec.ts index 30e78d1cba6..87432cbf868 100644 --- a/extensions/podman/src/podman-install.spec.ts +++ b/extensions/podman/src/podman-install.spec.ts @@ -503,6 +503,10 @@ test('expect winWSL2 preflight check return failure result if the machine has WS expect(result.description).equal( 'WSL2 seems to be installed but the system needs to be restarted so the changes can take effect.', ); + expect(result.docLinksDescription).equal( + `If already restarted, call 'wsl --install --no-distribution' in a terminal.`, + ); + expect(result.docLinks[0].url).equal('https://learn.microsoft.com/en-us/windows/wsl/install'); }); test('expect winWSL2 preflight check return successful result if the machine has WSL2 installed and the reboot check fails with a code different from WSL_E_WSL_OPTIONAL_COMPONENT_REQUIRED', async () => { diff --git a/extensions/podman/src/podman-install.ts b/extensions/podman/src/podman-install.ts index 4e18b8943d5..9f5881aee93 100755 --- a/extensions/podman/src/podman-install.ts +++ b/extensions/podman/src/podman-install.ts @@ -666,6 +666,11 @@ class WSL2Check extends BaseCheck { return this.createFailureResult({ description: 'WSL2 seems to be installed but the system needs to be restarted so the changes can take effect.', + docLinksDescription: `If already restarted, call 'wsl --install --no-distribution' in a terminal.`, + docLinks: { + url: 'https://learn.microsoft.com/en-us/windows/wsl/install', + title: 'WSL2 Manual Installation Steps', + }, }); } } catch (err) {