From 8955758ae455b051088868edc387620dd2f587b3 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Fri, 28 Apr 2023 23:02:45 +0530 Subject: [PATCH 1/9] (Chore) : Added new prerequisite on win for permission to run ps1 scripts Signed-off-by: Abhijay jain --- src/main/handlers/Utilities/Prerequisites.ts | 3 ++- src/renderer/components/Config/PrereqsView.tsx | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/handlers/Utilities/Prerequisites.ts b/src/main/handlers/Utilities/Prerequisites.ts index 906956b3..af067b4e 100644 --- a/src/main/handlers/Utilities/Prerequisites.ts +++ b/src/main/handlers/Utilities/Prerequisites.ts @@ -4,5 +4,6 @@ export const WindowsPrerequisites: AppModel[] = [ getAppModel('wsl', 'Windows Subsystem for Linux (WSL)', 'wsl --status;', false), getAppModel('wslUbuntu', 'WSL Ubuntu Distribution', 'wsl --status;', false), getAppModel('dockerDesktop', 'Docker Desktop', 'docker version;', false), - getAppModel('dockerDesktopUbuntu', 'Docker Desktop WSL Ubuntu Integration', 'wsl docker version;', false) + getAppModel('dockerDesktopUbuntu', 'Docker Desktop WSL Ubuntu Integration', 'wsl docker version;', false), + getAppModel('ps1ExecutionPolicy', 'PowerShell execution policy', 'Get-ExecutionPolicy;', false) ] diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index e5e231bf..4a55d77a 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -102,6 +102,18 @@ const PrereqsView = ({ onChange, sx }: Props) => { . ) + } else if (status.id === 'ps1ExecutionPolicy') { + status.description = ( + + + Check whether the execution policy is set to allow unsigned PowerShell scripts.{' '} + + + Learn more + + . + + ) } } From 16ba6f827383ad5455d9cf1d671c933a5bb0f490 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Thu, 11 May 2023 16:00:09 +0530 Subject: [PATCH 2/9] added check Signed-off-by: Abhijay jain --- src/main/handlers/Utilities/Utilities.class.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/handlers/Utilities/Utilities.class.ts b/src/main/handlers/Utilities/Utilities.class.ts index 0804310d..145dad23 100755 --- a/src/main/handlers/Utilities/Utilities.class.ts +++ b/src/main/handlers/Utilities/Utilities.class.ts @@ -115,7 +115,7 @@ class Utilities { } if ( - (prerequisite.id === 'wsl' && stdOutput) || + (prerequisite.id === 'wsl' && stdOutput) || (prerequisite.id === 'ps1ExecutionPolicy' && stdOutput.includes('RemoteSigned')) || (prerequisite.id === 'wslUbuntu' && stdOutput.includes(': Ubuntu')) || ((prerequisite.id === 'dockerDesktop' || prerequisite.id === 'dockerDesktopUbuntu') && stdOutput.includes('Server: Docker Desktop')) From f08631aad44ae45266dcf6f879cdf3bcbd24edc3 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Thu, 11 May 2023 16:14:53 +0530 Subject: [PATCH 3/9] added link to exec policy Signed-off-by: Abhijay jain --- src/renderer/components/Config/PrereqsView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index 4a55d77a..2e598d66 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -108,7 +108,7 @@ const PrereqsView = ({ onChange, sx }: Props) => { Check whether the execution policy is set to allow unsigned PowerShell scripts.{' '} - + Learn more . From 55f05801295724e8435ef13a9de89f6b1deace5c Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Sat, 20 May 2023 18:23:33 +0530 Subject: [PATCH 4/9] Chore : Fixed requested changes Signed-off-by: Abhijay jain --- src/constants/Endpoints.ts | 4 +++- src/main/handlers/Utilities/Prerequisites.ts | 2 +- src/main/handlers/Utilities/Utilities.class.ts | 4 +++- src/renderer/components/Config/PrereqsView.tsx | 13 +++++++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/constants/Endpoints.ts b/src/constants/Endpoints.ts index 9d133041..bdf600d3 100755 --- a/src/constants/Endpoints.ts +++ b/src/constants/Endpoints.ts @@ -31,7 +31,9 @@ const Endpoints = { MICROK8S_REGISTRY_CATALOG: 'http://localhost:32000/v2/_catalog', MICROK8S_WINDOWS_REGISTRY_CATALOG: 'http://microk8s.registry:32000/v2/_catalog', SUPPORT_GITHUB: 'https://github.com/EtherealEngine/etherealengine-control-center/issues', - SUPPORT_DISCORD: 'https://discord.gg/xrf' + SUPPORT_DISCORD: 'https://discord.gg/xrf', + SET_EXECUTION_POLICY: + 'https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies' }, Paths: { ENGINE_ENV: '.env.local', diff --git a/src/main/handlers/Utilities/Prerequisites.ts b/src/main/handlers/Utilities/Prerequisites.ts index af067b4e..56739f02 100644 --- a/src/main/handlers/Utilities/Prerequisites.ts +++ b/src/main/handlers/Utilities/Prerequisites.ts @@ -5,5 +5,5 @@ export const WindowsPrerequisites: AppModel[] = [ getAppModel('wslUbuntu', 'WSL Ubuntu Distribution', 'wsl --status;', false), getAppModel('dockerDesktop', 'Docker Desktop', 'docker version;', false), getAppModel('dockerDesktopUbuntu', 'Docker Desktop WSL Ubuntu Integration', 'wsl docker version;', false), - getAppModel('ps1ExecutionPolicy', 'PowerShell execution policy', 'Get-ExecutionPolicy;', false) + getAppModel('ps1ExecutionPolicy', 'PowerShell Execution Policy', 'Get-ExecutionPolicy;', false) ] diff --git a/src/main/handlers/Utilities/Utilities.class.ts b/src/main/handlers/Utilities/Utilities.class.ts index aa14113f..81581eee 100755 --- a/src/main/handlers/Utilities/Utilities.class.ts +++ b/src/main/handlers/Utilities/Utilities.class.ts @@ -127,7 +127,9 @@ class Utilities { } if ( - (prerequisite.id === 'wsl' && stdOutput) || (prerequisite.id === 'ps1ExecutionPolicy' && stdOutput.includes('RemoteSigned')) || + (prerequisite.id === 'wsl' && stdOutput) || + (prerequisite.id === 'ps1ExecutionPolicy' && + (stdOutput.includes('RemoteSigned') || stdOutput.includes('Unrestricted'))) || (prerequisite.id === 'wslUbuntu' && stdOutput.includes(': Ubuntu')) || ((prerequisite.id === 'dockerDesktop' || prerequisite.id === 'dockerDesktopUbuntu') && stdOutput.includes('Server: Docker Desktop')) diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index 2d0bb052..cc96c1f5 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -95,12 +95,21 @@ const PrereqsView = ({ sx }: Props) => { status.description = ( - Check whether the execution policy is set to allow unsigned PowerShell scripts.{' '} + Check whether the execution policy is set to allow unsigned PowerShell scripts. - + Learn more . +
+
+
+ + Afterwards, if The execution policy is not set to allow unsigned PowerShell scripts, then you can do so by + running following command: + +
+ Set-ExecutionPolicy Unrestricted
) } From f74de8915a5db0172d7d895c88bc69b317705df6 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Mon, 22 May 2023 16:58:36 +0530 Subject: [PATCH 5/9] (chore):cross for all states other than Unrestricted Signed-off-by: Abhijay jain --- src/main/handlers/Utilities/Utilities.class.ts | 8 ++++++-- src/renderer/components/Config/PrereqsView.tsx | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/handlers/Utilities/Utilities.class.ts b/src/main/handlers/Utilities/Utilities.class.ts index 81581eee..ce29d5ac 100755 --- a/src/main/handlers/Utilities/Utilities.class.ts +++ b/src/main/handlers/Utilities/Utilities.class.ts @@ -103,7 +103,7 @@ class Utilities { return WindowsPrerequisites } } catch (err) { - log.error('Failed to get pre requisites.', err) + log.error('Failed to get prerequisites.', err) } return [] @@ -129,7 +129,7 @@ class Utilities { if ( (prerequisite.id === 'wsl' && stdOutput) || (prerequisite.id === 'ps1ExecutionPolicy' && - (stdOutput.includes('RemoteSigned') || stdOutput.includes('Unrestricted'))) || + stdOutput.includes('Unrestricted')) || (prerequisite.id === 'wslUbuntu' && stdOutput.includes(': Ubuntu')) || ((prerequisite.id === 'dockerDesktop' || prerequisite.id === 'dockerDesktopUbuntu') && stdOutput.includes('Server: Docker Desktop')) @@ -137,6 +137,10 @@ class Utilities { status = AppStatus.Configured } + if (prerequisite.id === 'ps1ExecutionPolicy' && !stdOutput.includes('Unrestricted')) { + status = AppStatus.NotConfigured + } + return { ...prerequisite, detail: stderr ? stderr : stdOutput, diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index cc96c1f5..3bceaa32 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -52,7 +52,7 @@ const PrereqsView = ({ sx }: Props) => { status.description = ( - Make sure WSL is installed and Ubuntu is selected as default distribution.{' '} + Make sure WSL is installed and Ubuntu is selected as the default distribution.{' '} Install WSL @@ -63,15 +63,15 @@ const PrereqsView = ({ sx }: Props) => {

- To ensure 'Ubuntu' is set as default WSL distribution. You can check your default distribution by - running following command in Powershell/CMD: + To ensure 'Ubuntu' is set as the default WSL distribution, you can check your default distribution by + running the following command in PowerShell/CMD:
wsl -l

- Afterwards, if Ubuntu is not selected as default, then you can do so by running following command: + Afterwards, if Ubuntu is not selected as the default, you can do so by running the following command:
wsl -s Ubuntu @@ -105,8 +105,8 @@ const PrereqsView = ({ sx }: Props) => {

- Afterwards, if The execution policy is not set to allow unsigned PowerShell scripts, then you can do so by - running following command: + Afterwards, if the execution policy is not set to allow unsigned PowerShell scripts, you can do so by + running the following command:
Set-ExecutionPolicy Unrestricted From 799ba2b3d0d96816708a6d14c91c11644749cf15 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Thu, 25 May 2023 22:07:49 +0530 Subject: [PATCH 6/9] chore : resolved requested changes Signed-off-by: Abhijay jain --- src/main/handlers/Utilities/Prerequisites.ts | 7 +++- .../handlers/Utilities/Utilities.class.ts | 7 +--- .../components/Config/PrereqsView.tsx | 33 ++++++++++++++----- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/src/main/handlers/Utilities/Prerequisites.ts b/src/main/handlers/Utilities/Prerequisites.ts index 56739f02..bd6c0466 100644 --- a/src/main/handlers/Utilities/Prerequisites.ts +++ b/src/main/handlers/Utilities/Prerequisites.ts @@ -5,5 +5,10 @@ export const WindowsPrerequisites: AppModel[] = [ getAppModel('wslUbuntu', 'WSL Ubuntu Distribution', 'wsl --status;', false), getAppModel('dockerDesktop', 'Docker Desktop', 'docker version;', false), getAppModel('dockerDesktopUbuntu', 'Docker Desktop WSL Ubuntu Integration', 'wsl docker version;', false), - getAppModel('ps1ExecutionPolicy', 'PowerShell Execution Policy', 'Get-ExecutionPolicy;', false) + getAppModel( + 'ps1ExecutionPolicy', + 'PowerShell Execution Policy', + 'Get-ExecutionPolicy; $PSVersionTable.PSVersion', + false + ) ] diff --git a/src/main/handlers/Utilities/Utilities.class.ts b/src/main/handlers/Utilities/Utilities.class.ts index ce29d5ac..28d0adf3 100755 --- a/src/main/handlers/Utilities/Utilities.class.ts +++ b/src/main/handlers/Utilities/Utilities.class.ts @@ -128,8 +128,7 @@ class Utilities { if ( (prerequisite.id === 'wsl' && stdOutput) || - (prerequisite.id === 'ps1ExecutionPolicy' && - stdOutput.includes('Unrestricted')) || + (prerequisite.id === 'ps1ExecutionPolicy' && stdOutput.includes('Unrestricted')) || (prerequisite.id === 'wslUbuntu' && stdOutput.includes(': Ubuntu')) || ((prerequisite.id === 'dockerDesktop' || prerequisite.id === 'dockerDesktopUbuntu') && stdOutput.includes('Server: Docker Desktop')) @@ -137,10 +136,6 @@ class Utilities { status = AppStatus.Configured } - if (prerequisite.id === 'ps1ExecutionPolicy' && !stdOutput.includes('Unrestricted')) { - status = AppStatus.NotConfigured - } - return { ...prerequisite, detail: stderr ? stderr : stdOutput, diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index 3bceaa32..ebec9418 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -95,21 +95,38 @@ const PrereqsView = ({ sx }: Props) => { status.description = ( - Check whether the execution policy is set to allow unsigned PowerShell scripts. + { + // Check if the user agent contains PowerShell version information + window.navigator.userAgent.includes('PowerShell') + ? `Run the following command in PowerShell ${window.navigator.userAgent}:` + : 'Run the following command in PowerShell:' + } -
- Learn more - - .

+ + Check whether the execution policy is set to allow unsigned PowerShell scripts. + +

Afterwards, if the execution policy is not set to allow unsigned PowerShell scripts, you can do so by - running the following command: + running the following commands: +
+
+ Get-ExecutionPolicy - This command will show you the current execution policy. +
+
+ Set-ExecutionPolicy Unrestricted - Use this command to set the execution policy to allow + unsigned PowerShell scripts. +
+
+ Refer to the Microsoft documentation for information on PowerShell execution policies and  
-
- Set-ExecutionPolicy Unrestricted + + Learn more + + .
) } From 5fbea085fbb17af365cbb0f93aa69451f6502a56 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Thu, 15 Jun 2023 09:14:28 +0530 Subject: [PATCH 7/9] fixed description Signed-off-by: Abhijay jain --- src/renderer/components/Config/PrereqsView.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index ebec9418..257ed611 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -114,11 +114,10 @@ const PrereqsView = ({ sx }: Props) => { running the following commands:

- Get-ExecutionPolicy - This command will show you the current execution policy. + Get-ExecutionPolicy

- Set-ExecutionPolicy Unrestricted - Use this command to set the execution policy to allow - unsigned PowerShell scripts. + Set-ExecutionPolicy Unrestricted

Refer to the Microsoft documentation for information on PowerShell execution policies and   From a0bd213b04eb5628dbcd00faf36d3f05a6d6413c Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Sun, 25 Jun 2023 22:46:03 +0530 Subject: [PATCH 8/9] chore :added functions to retrieve ps version Signed-off-by: Abhijay jain --- src/constants/Channels.ts | 3 +- src/main/handlers/Utilities/Prerequisites.ts | 2 +- .../handlers/Utilities/Utilities.class.ts | 11 +++ .../handlers/Utilities/Utilities.handler.ts | 3 + .../components/Config/PrereqsView.tsx | 69 ++++++++++--------- 5 files changed, 53 insertions(+), 35 deletions(-) diff --git a/src/constants/Channels.ts b/src/constants/Channels.ts index 49159f3b..eb53678d 100644 --- a/src/constants/Channels.ts +++ b/src/constants/Channels.ts @@ -18,7 +18,8 @@ const Channels = { SaveLog: 'SaveLog', GetPrerequisites: 'GetPrerequisites', CheckPrerequisite: 'CheckPrerequisite', - GetWSLPrefixPath: 'GetWSLPrefixPath' + GetWSLPrefixPath: 'GetWSLPrefixPath', + GetPowerShellVersion: 'GetPowerShellVersion' }, Git: { GetCurrentConfigs: 'GetCurrentConfigs', diff --git a/src/main/handlers/Utilities/Prerequisites.ts b/src/main/handlers/Utilities/Prerequisites.ts index bd6c0466..e922c857 100644 --- a/src/main/handlers/Utilities/Prerequisites.ts +++ b/src/main/handlers/Utilities/Prerequisites.ts @@ -8,7 +8,7 @@ export const WindowsPrerequisites: AppModel[] = [ getAppModel( 'ps1ExecutionPolicy', 'PowerShell Execution Policy', - 'Get-ExecutionPolicy; $PSVersionTable.PSVersion', + '$env:PSModulePath = "$PSHomeModules"; Get-ExecutionPolicy;', false ) ] diff --git a/src/main/handlers/Utilities/Utilities.class.ts b/src/main/handlers/Utilities/Utilities.class.ts index 9173ca75..885c5dd5 100755 --- a/src/main/handlers/Utilities/Utilities.class.ts +++ b/src/main/handlers/Utilities/Utilities.class.ts @@ -1,3 +1,4 @@ +import { execSync } from 'child_process' import { app, BrowserWindow, clipboard, dialog, shell } from 'electron' import log from 'electron-log' import { promises as fs } from 'fs' @@ -109,6 +110,16 @@ class Utilities { return [] } + static getPowerShellVersion = () => { + try { + const version = execSync('powershell.exe -Command "$PSVersionTable.PSVersion.Major"').toString().trim() + return version + } catch (err) { + log.error('Failed to get PowerShell version.', err) + throw err + } + } + static checkPrerequisite = async (prerequisite: AppModel) => { try { let status = AppStatus.NotConfigured diff --git a/src/main/handlers/Utilities/Utilities.handler.ts b/src/main/handlers/Utilities/Utilities.handler.ts index 7ee99692..890be7f5 100755 --- a/src/main/handlers/Utilities/Utilities.handler.ts +++ b/src/main/handlers/Utilities/Utilities.handler.ts @@ -34,6 +34,9 @@ class UtilitiesHandler implements IBaseHandler { ipcMain.handle(Channels.Utilities.GetPrerequisites, async (_event: IpcMainInvokeEvent) => { return await Utilities.getPrerequisites() }), + ipcMain.handle(Channels.Utilities.GetPowerShellVersion, (_event: IpcMainInvokeEvent) => { + return Utilities.getPowerShellVersion() + }), ipcMain.handle( Channels.Utilities.CheckPrerequisite, async (_event: IpcMainInvokeEvent, prerequisite: AppModel) => { diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index 257ed611..9811612b 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -1,4 +1,7 @@ +import Channels from 'constants/Channels' import Endpoints from 'constants/Endpoints' +import { ipcRenderer } from 'electron' +import log from 'electron-log' import { AppModel, AppStatus } from 'models/AppStatus' import { useEffect, useState } from 'react' import { SettingsService } from 'renderer/services/SettingsService' @@ -47,7 +50,7 @@ const PrereqsView = ({ sx }: Props) => { ) } - const processDescriptions = (status: AppModel) => { + const processDescriptions = async (status: AppModel) => { if (status.id === 'wsl' || status.id === 'wslUbuntu') { status.description = ( @@ -92,42 +95,42 @@ const PrereqsView = ({ sx }: Props) => { ) } else if (status.id === 'ps1ExecutionPolicy') { - status.description = ( - - - { - // Check if the user agent contains PowerShell version information - window.navigator.userAgent.includes('PowerShell') - ? `Run the following command in PowerShell ${window.navigator.userAgent}:` - : 'Run the following command in PowerShell:' - } - -
-
- - Check whether the execution policy is set to allow unsigned PowerShell scripts. - -
-
- - Afterwards, if the execution policy is not set to allow unsigned PowerShell scripts, you can do so by - running the following commands: -
+ try { + const powerShellVersion = await ipcRenderer.invoke(Channels.Utilities.GetPowerShellVersion) + status.description = ( + + + Use PowerShell {powerShellVersion} for the following instructions. +
- Get-ExecutionPolicy
+ + Check whether the execution policy is set to allow unsigned PowerShell scripts. +
- Set-ExecutionPolicy Unrestricted
-
- Refer to the Microsoft documentation for information on PowerShell execution policies and   -
- - Learn more - - . -
- ) + + Afterwards, if the execution policy is not set to allow unsigned PowerShell scripts, you can do so by + running the following commands: +
+
+ Get-ExecutionPolicy +
+
+ Set-ExecutionPolicy Unrestricted +
+
+ Refer to the Microsoft documentation for information on PowerShell execution policies and   +
+ + Learn more + + . + + ) + } catch (err) { + log.error('Failed to retrieve PowerShell version.', err) + } } } From aabb43a6cabd98eeec863ecb87fefa5c832802f1 Mon Sep 17 00:00:00 2001 From: Abhijay jain Date: Sun, 25 Jun 2023 22:50:01 +0530 Subject: [PATCH 9/9] chore : fixed formatting Signed-off-by: Abhijay jain --- src/main/Clusters/MicroK8s/MicroK8s.class.ts | 2 +- src/main/handlers/Engine/Engine.class.ts | 2 +- src/main/handlers/Engine/Engine.handler.ts | 6 +++--- src/main/managers/FileServerManager.ts | 1 - src/renderer/components/Config/PrereqsView.tsx | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/Clusters/MicroK8s/MicroK8s.class.ts b/src/main/Clusters/MicroK8s/MicroK8s.class.ts index f65b70b9..766d4d8e 100644 --- a/src/main/Clusters/MicroK8s/MicroK8s.class.ts +++ b/src/main/Clusters/MicroK8s/MicroK8s.class.ts @@ -157,7 +157,7 @@ class MicroK8s { if (code !== 0) { throw `Failed with error code ${code}.` } - + await startFileServer(window, cluster) } catch (err) { log.error('Error in configureCluster MicroK8s.', err) diff --git a/src/main/handlers/Engine/Engine.class.ts b/src/main/handlers/Engine/Engine.class.ts index eaa58585..3b982509 100755 --- a/src/main/handlers/Engine/Engine.class.ts +++ b/src/main/handlers/Engine/Engine.class.ts @@ -119,7 +119,7 @@ class Engine { ) } } - + static startFileServer = async (parentWindow: BrowserWindow, cluster: ClusterModel) => { try { await startFileServer(parentWindow, cluster) diff --git a/src/main/handlers/Engine/Engine.handler.ts b/src/main/handlers/Engine/Engine.handler.ts index add7b29c..d3f0f9e0 100755 --- a/src/main/handlers/Engine/Engine.handler.ts +++ b/src/main/handlers/Engine/Engine.handler.ts @@ -11,9 +11,9 @@ class EngineHandler implements IBaseHandler { ipcMain.handle(Channels.Engine.EnsureAdminAccess, async (_event: IpcMainInvokeEvent, cluster: ClusterModel) => { await Engine.ensureAdminAccess(window, cluster) }), - ipcMain.handle(Channels.Engine.StartFileServer, async (_event: IpcMainInvokeEvent, cluster: ClusterModel) => { - await Engine.startFileServer(window, cluster) - }) + ipcMain.handle(Channels.Engine.StartFileServer, async (_event: IpcMainInvokeEvent, cluster: ClusterModel) => { + await Engine.startFileServer(window, cluster) + }) } } diff --git a/src/main/managers/FileServerManager.ts b/src/main/managers/FileServerManager.ts index 749469ed..dee9e6d5 100644 --- a/src/main/managers/FileServerManager.ts +++ b/src/main/managers/FileServerManager.ts @@ -53,4 +53,3 @@ export const startFileServer = async (window: BrowserWindow, cluster: ClusterMod onFileServerStd ) } - \ No newline at end of file diff --git a/src/renderer/components/Config/PrereqsView.tsx b/src/renderer/components/Config/PrereqsView.tsx index 9811612b..38be4e9e 100644 --- a/src/renderer/components/Config/PrereqsView.tsx +++ b/src/renderer/components/Config/PrereqsView.tsx @@ -66,15 +66,15 @@ const PrereqsView = ({ sx }: Props) => {

- To ensure 'Ubuntu' is set as the default WSL distribution, you can check your default distribution by - running the following command in PowerShell/CMD: + To ensure 'Ubuntu' is set as default WSL distribution. You can check your default distribution by + running following command in Powershell/CMD:
wsl -l

- Afterwards, if Ubuntu is not selected as the default, you can do so by running the following command: + Afterwards, if Ubuntu is not selected as default, then you can do so by running following command:
wsl -s Ubuntu