Skip to content

Commit 88c954d

Browse files
Use nested Join-Path for Windows PowerShell 5.1 compatibility
Join-Path -AdditionalChildPath is PowerShell 6+ only; nested Join-Path calls keep the same behavior while remaining compatible with Windows PowerShell 5.1.
1 parent 93868d8 commit 88c954d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Helpers/Helpers.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ function Install-PSModule {
321321
$moduleVersion = '999.0.0'
322322
}
323323
$PSModulePath = $env:PSModulePath -split [System.IO.Path]::PathSeparator | Select-Object -First 1
324-
$codePath = New-Item -Path (Join-Path -Path $PSModulePath -ChildPath $moduleName -AdditionalChildPath $moduleVersion) -ItemType Directory -Force | Select-Object -ExpandProperty FullName
324+
$codePath = New-Item -Path (Join-Path -Path (Join-Path -Path $PSModulePath -ChildPath $moduleName) -ChildPath $moduleVersion) -ItemType Directory -Force | Select-Object -ExpandProperty FullName
325325
Copy-Item -Path "$Path/*" -Destination $codePath -Recurse -Force
326326
Write-Host '::group::Importing module'
327327
# Import the freshly-installed copy explicitly by its manifest path (with -Force) so it is

0 commit comments

Comments
 (0)