Skip to content
Snippets Groups Projects
Commit aa7e4a82 authored by ali asaria's avatar ali asaria
Browse files

removing check for wsl distro and version (for now) as it fails for some people

parent 8a4f4727
No related branches found
No related tags found
No related merge requests found
...@@ -81,10 +81,11 @@ export async function checkForMissingSystemRequirements() { ...@@ -81,10 +81,11 @@ export async function checkForMissingSystemRequirements() {
// We must use encoding = utf16le because that is the default for powershell // 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 // 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. // 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; if (stderr) return stderr;
//Read the output. The output looks like this: //Read the output. The output looks like this:
//Default Distribution: Ubuntu //Default Distribution: Ubuntu
//Default Version: 2 //Default Version: 2
...@@ -107,9 +108,10 @@ export async function checkForMissingSystemRequirements() { ...@@ -107,9 +108,10 @@ export async function checkForMissingSystemRequirements() {
console.log(`WSL version: ${version}`); console.log(`WSL version: ${version}`);
// Check if the distro is set to Ubuntu and the version is 2 // Check if the distro is set to Ubuntu and the version is 2
if (distro != 'Ubuntu' || version != '2') { // Removing this check for now as it seems to fail on some systems (not sure why)
return `WSL distro must be set to Ubuntu and version 2. Please run 'wsl --set-version Ubuntu 2'.`; // 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) { } catch (error) {
return 'WSL is not enabled. Please enable WSL and install a distro.'; return 'WSL is not enabled. Please enable WSL and install a distro.';
} }
...@@ -448,9 +450,7 @@ export async function executeInstallStep( ...@@ -448,9 +450,7 @@ export async function executeInstallStep(
// Set installer script filename and options based on platform // 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 // For windows this is a bit hacky...we need to pass a unix-style path to WSL
const exec_cmd = isPlatformWindows() const exec_cmd = isPlatformWindows() ? `wsl` : `${fullInstallScriptPath}`;
? `wsl`
: `${fullInstallScriptPath}`;
console.log(`Running: ${exec_cmd}`); console.log(`Running: ${exec_cmd}`);
// Call installer script and return stdout if it succeeds // Call installer script and return stdout if it succeeds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment