Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eng/common/scripts/Save-Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ function SetOutput($outputPath, $incomingPackageSpec) {
}

function GetRelativePath($path) {
# If the path is empty return an empty string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a case where we are validly passing empty here?

Copy link
Member Author

@danieljurek danieljurek Jun 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this instance Azure.Core.TestFramework does not have a CHANGELOG.md https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/core/Azure.Core.TestFramework

In previous builds this would have produced output like:

{
  "Name": "Azure.Core.TestFramework",
  "Version": "",
  "DirectoryPath": "D:\\a\\_work\\1\\s\\sdk\\core\\Azure.Core.TestFramework",
  "ServiceDirectory": "core",
  "ReadMePath": "D:\\a\\_work\\1\\s\\sdk\\core\\Azure.Core.TestFramework\\README.md",
  "ChangeLogPath": "",
  "Group": null,
  "SdkType": "client",
  "IsNewSdk": true,
  "ArtifactName": "Azure.Core.TestFramework",
  "ReleaseStatus": null
}

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 "\\", '/'
Expand Down