From a40f55280ba7372d358f7311e9881a1536d3ce8c Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Wed, 11 Oct 2023 22:22:03 +0200 Subject: [PATCH] refactor(ps): wsl_wslg - change parameter name --- wsl/wsl_wslg.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wsl/wsl_wslg.ps1 b/wsl/wsl_wslg.ps1 index 4e42173c..15e3589f 100644 --- a/wsl/wsl_wslg.ps1 +++ b/wsl/wsl_wslg.ps1 @@ -7,14 +7,14 @@ Enable/disable WSLg. Specify the value to true or false to enable/disable WSLg. .EXAMPLE -wsl/wsl_wslg.ps1 -WSLg 'true' -wsl/wsl_wslg.ps1 -WSLg 'false' +wsl/wsl_wslg.ps1 -GuiApplications 'true' +wsl/wsl_wslg.ps1 -GuiApplications 'false' #> [CmdletBinding()] param ( [Parameter(Mandatory, Position = 0)] [ValidateSet('true', 'false')] - [string]$WSLg + [string]$GuiApplications ) begin { @@ -36,14 +36,14 @@ process { if (Test-Path "$HOME/.wslconfig") { $wslConfig = Get-Content -Path "$HOME/.wslconfig" | ConvertFrom-Cfg if ($wslConfig.wsl2) { - $wslConfig.wsl2.guiApplications = $WSLg + $wslConfig.wsl2.guiApplications = $GuiApplications } else { - $wslConfig.wsl2 = @{ guiApplications = $WSLg } + $wslConfig.wsl2 = @{ guiApplications = $GuiApplications } } } else { $wslConfig = [ordered]@{ wsl2 = @{ - guiApplications = $WSLg + guiApplications = $GuiApplications } } } @@ -54,5 +54,5 @@ process { } end { - Write-Host "WSLg $($WSLg -eq 'true' ? 'enabled': 'disabled')." + Write-Host "WSLg $($GuiApplications -eq 'true' ? 'enabled': 'disabled')." }