Skip to content

Commit 6b11d79

Browse files
authored
Substitute use of IsPathFullyQualified to restore Windows PowerShell compatibility (#60)
* Fix PS5.1-incompatible use of IsPathFullyQualified in Initialize-PSBuild.ps1
1 parent 9be195a commit 6b11d79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PowerShellBuild/Public/Initialize-PSBuild.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Initialize-PSBuild {
2222
[switch]$UseBuildHelpers
2323
)
2424

25-
if ([IO.Path]::IsPathFullyQualified($BuildEnvironment.Build.OutDir)) {
25+
if ($BuildEnvironment.Build.OutDir.StartsWith($env:BHProjectPath, [StringComparison]::OrdinalIgnoreCase)) {
2626
$BuildEnvironment.Build.ModuleOutDir = [IO.Path]::Combine($BuildEnvironment.Build.OutDir, $env:BHProjectName, $BuildEnvironment.General.ModuleVersion)
2727
} else {
2828
$BuildEnvironment.Build.ModuleOutDir = [IO.Path]::Combine($env:BHProjectPath, $BuildEnvironment.Build.OutDir, $env:BHProjectName, $BuildEnvironment.General.ModuleVersion)

0 commit comments

Comments
 (0)