From 9aaefb2cf08e3e96585f4547e6777b3de5127cd5 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 10 Aug 2024 01:50:52 +0200 Subject: [PATCH] Fix broken scripts --- scripts/Windows/OS/Install.ps1 | 2 +- scripts/Windows/Scripts/PowerManagement.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index c40005a8..4bb69dcd 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -98,7 +98,7 @@ $null = New-Module { if (-not (& { $null = wsl -l; $?; })) { $wslRoot = Split-Path -Parent $wslLocation; - if (-not (Test-Path -PathType $wslRoot)) { + if (-not (Test-Path $wslRoot)) { $null = New-Item -ItemType Directory $wslRoot; } diff --git a/scripts/Windows/Scripts/PowerManagement.ps1 b/scripts/Windows/Scripts/PowerManagement.ps1 index a4d028be..69f834cc 100644 --- a/scripts/Windows/Scripts/PowerManagement.ps1 +++ b/scripts/Windows/Scripts/PowerManagement.ps1 @@ -77,7 +77,7 @@ $null = New-Module { [switch] $System, [Parameter(ParameterSetName="User",Mandatory)] [switch] $User, - [Parameter(Mandatory)] + [Parameter(ParameterSetName="User")] [RegistryKey] $UserKey )