From aa7e4a820fb716a8e9b04e44f0ed82b31db9c22f Mon Sep 17 00:00:00 2001
From: ali asaria <aliasaria@users.noreply.github.com>
Date: Tue, 4 Feb 2025 09:20:54 -0500
Subject: [PATCH] removing check for wsl distro and version (for now) as it
 fails for some people

---
 src/main/util.ts | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/main/util.ts b/src/main/util.ts
index dc545a0a..f51d83c5 100644
--- a/src/main/util.ts
+++ b/src/main/util.ts
@@ -81,10 +81,11 @@ export async function checkForMissingSystemRequirements() {
         // We must use encoding = utf16le because that is the default for powershell
         // according to https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-7.4
         // There is a potential for a bug here if the user changed their powershell encoding.
-        const { stdout, stderr } = await awaitExec('wsl --status', { encoding: 'utf16le' });
+        const { stdout, stderr } = await awaitExec('wsl --status', {
+          encoding: 'utf16le',
+        });
         if (stderr) return stderr;
 
-
         //Read the output. The output looks like this:
         //Default Distribution: Ubuntu
         //Default Version: 2
@@ -107,9 +108,10 @@ export async function checkForMissingSystemRequirements() {
         console.log(`WSL version: ${version}`);
 
         // Check if the distro is set to Ubuntu and the version is 2
-        if (distro != 'Ubuntu' || version != '2') {
-          return `WSL distro must be set to Ubuntu and version 2. Please run 'wsl --set-version Ubuntu 2'.`;
-        }
+        // Removing this check for now as it seems to fail on some systems (not sure why)
+        // if (distro != 'Ubuntu' || version != '2') {
+        //   return `WSL distro must be set to Ubuntu and version 2. Please run 'wsl --set-version Ubuntu 2'.`;
+        // }
       } catch (error) {
         return 'WSL is not enabled. Please enable WSL and install a distro.';
       }
@@ -448,9 +450,7 @@ export async function executeInstallStep(
 
   // Set installer script filename and options based on platform
   // For windows this is a bit hacky...we need to pass a unix-style path to WSL
-  const exec_cmd = isPlatformWindows()
-    ? `wsl`
-    : `${fullInstallScriptPath}`;
+  const exec_cmd = isPlatformWindows() ? `wsl` : `${fullInstallScriptPath}`;
 
   console.log(`Running: ${exec_cmd}`);
   // Call installer script and return stdout if it succeeds
-- 
GitLab