From cbee4335f349ddb3d7778b76cb0b1456f3336a59 Mon Sep 17 00:00:00 2001 From: ek-dyoder Date: Wed, 4 Mar 2026 22:55:16 -0500 Subject: [PATCH] fix: improve syntax for Test-Path and Remove-Item in ekDNSHelper deletion logic --- Fix-UpdateLocalHosts.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fix-UpdateLocalHosts.ps1 b/Fix-UpdateLocalHosts.ps1 index 4b8625d..aa3159e 100644 --- a/Fix-UpdateLocalHosts.ps1 +++ b/Fix-UpdateLocalHosts.ps1 @@ -26,9 +26,9 @@ If ($DownloadRequired) { } # Delete the old version of ekDNSHelper if it exists -If ( Test-Path $Global:ToolsDirectory + '\dns-helper.exe' ) { +If ( Test-Path ($Global:ToolsDirectory + '\dns-helper.exe') ) { Write-Output "Deleting old version of ekDNSHelper: ${Global:ToolsDirectory}\dns-helper.exe" - Remove-Item -Path $($Global:ToolsDirectory + '\dns-helper.exe') -Force -ErrorAction SilentlyContinue + Remove-Item -Path ($Global:ToolsDirectory + '\dns-helper.exe') -Force -ErrorAction SilentlyContinue } $RefreshScript = $Global:ToolsDirectory + '\refresh-local-hosts.bat'