Skip to content

Commit

Permalink
get pub and name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Jan 8, 2024
1 parent b6e0027 commit 59cbd01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ function GetRuntimeDependencyPackageId {
$nuspecFile = Join-Path $package 'manifest.nuspec'
$nuspec = [xml](Get-Content -Path $nuspecFile -Encoding UTF8)
$packageId = $nuspec.package.metadata.id
if ($packageId -match "^(.*).$($appJson.id)`$") {
$publisherAndName = $Matches[1]
if ($packageId -match "^([^.]+)\.([^.]+)\..*$($appJson.id)`$") {
$publisherAndName = "$($Matches[1]).$($Matches[2])"
Write-Host "Publisher is $($Matches[1]) and name is $($Matches[2])"
}
else {
throw "Cannot determine publisher and name from the $packageId"
Expand Down

0 comments on commit 59cbd01

Please sign in to comment.