fix: improve syntax for Test-Path and Remove-Item in ekDNSHelper deletion logic

This commit is contained in:
2026-03-04 22:55:16 -05:00
parent 751af98c6e
commit cbee4335f3
+2 -2
View File
@@ -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'