Уточнить настройки PSScriptAnalyzer

This commit is contained in:
Devin AI
2026-05-02 08:34:21 +00:00
parent 4bbf0b8b73
commit 087883b663
3 changed files with 21 additions and 9 deletions
+4 -4
View File
@@ -158,12 +158,12 @@ function Get-HostFromUrl {
try {
$uri = [Uri]$Url
$host = $uri.Host.ToLowerInvariant()
if ($host.StartsWith('www.')) {
return $host.Substring(4)
$uriHost = $uri.Host.ToLowerInvariant()
if ($uriHost.StartsWith('www.')) {
return $uriHost.Substring(4)
}
return $host
return $uriHost
}
catch {
return $null