From 1e464bdc77be0453cb1438a8c98cf30bdf49c301 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 21 Mar 2024 04:30:07 +0100 Subject: [PATCH] Fix non-functioning script --- scripts/Common/Config/powershell/lib.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Common/Config/powershell/lib.ps1 b/scripts/Common/Config/powershell/lib.ps1 index 2325468f..0612d26e 100644 --- a/scripts/Common/Config/powershell/lib.ps1 +++ b/scripts/Common/Config/powershell/lib.ps1 @@ -68,16 +68,16 @@ $null = New-Module { } $profiles | ForEach-Object { - $dirName = Split-Path -Parent $fileName; + $dirName = Split-Path -Parent $_; if (-not (Test-Path -PathType Container $dirName)) { $null = New-Item -ItemType Directory -Force $dirName; } - if ((Test-Path -PathType Leaf $fileName) -and (-not $Overwrite)) { - Add-Content -Force "$fileName" "`n$Statement"; + if ((Test-Path -PathType Leaf $_) -and (-not $Overwrite)) { + Add-Content -Force "$_" "`n$Statement"; } else { - Set-Content -Force "$fileName" "$Statement"; + Set-Content -Force "$_" "$Statement"; } };