Skip to content

Commit ebf7320

Browse files
Target the latest PowerShell LTS
Remove legacy Windows PowerShell compatibility paths from API transport and help-link validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 066d50a commit ebf7320

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/functions/private/Invoke-DomeneshopApiRequest.ps1

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,11 @@ function Invoke-DomeneshopApiRequest {
6262
)
6363

6464
$params = @{
65-
Method = $Method
66-
Uri = $Uri
67-
Credential = $credential
68-
ErrorAction = 'Stop'
69-
}
70-
71-
if ($PSVersionTable.PSVersion.Major -ge 6) {
72-
$params['Authentication'] = 'Basic'
65+
Method = $Method
66+
Uri = $Uri
67+
Authentication = 'Basic'
68+
Credential = $credential
69+
ErrorAction = 'Stop'
7370
}
7471

7572
if ($PSBoundParameters.ContainsKey('Body')) {

tests/PublicHelpLinks.Tests.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ $publicFunctionsPath = Join-Path -Path $publicFunctionsPath -ChildPath 'public'
1313
$testCases = Get-ChildItem -Path $publicFunctionsPath -Filter '*.ps1' -Recurse -File |
1414
Sort-Object -Property FullName |
1515
ForEach-Object {
16-
$relativeDirectory = $_.DirectoryName.Remove(0, $publicFunctionsPath.Length).TrimStart(
17-
[char[]] @([IO.Path]::DirectorySeparatorChar, [IO.Path]::AltDirectorySeparatorChar)
18-
)
16+
$relativePath = [IO.Path]::GetRelativePath($publicFunctionsPath, $_.FullName)
17+
$relativeDirectory = Split-Path -Path $relativePath -Parent
1918
$documentationPath = if ($relativeDirectory) {
2019
'{0}/{1}' -f ($relativeDirectory -replace '[\\/]', '/'), $_.BaseName
2120
} else {

0 commit comments

Comments
 (0)