diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 9e95ad7fc566..7e51813830dd 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -64,6 +64,10 @@ function SetOutput($outputPath, $incomingPackageSpec) { } function GetRelativePath($path) { + # If the path is empty return an empty string + if (!$path) { + return '' + } $relativeTo = Resolve-Path $PSScriptRoot/../../../ # Replace "\" with "/" so the path is valid across other platforms and tools $relativePath = [IO.Path]::GetRelativePath($relativeTo, $path) -replace "\\", '/'