Skip to content

Commit

Permalink
couple tweaks to relative path updates
Browse files Browse the repository at this point in the history
  • Loading branch information
m-nash authored and azure-sdk committed Jan 26, 2023
1 parent b45264e commit 58175c5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions eng/common/scripts/Cadl-Project-Sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,9 @@ Write-Host "Reading configuration from $cadlConfigurationFile"
$configuration = Get-Content -Path $cadlConfigurationFile -Raw | ConvertFrom-Yaml

$pieces = $cadlConfigurationFile.Path.Replace("\","/").Split("/")
$projectName = $pieces[$pieces.Count - 3]
$projectName = $pieces[$pieces.Count - 2]

# clone the whole RP directory which is the parent of $configuration["directory"]
if ($configuration["directory"] -match "^[^/\\]+[\\/]+[^/\\]+") {
$specSubDirectory = $Matches[0]
}
else {
throw "The directory in $cadlConfigurationFile is not expected"
}
$specSubDirectory = $configuration["directory"]

if ( $configuration["repo"] -and $configuration["commit"]) {
$specCloneDir = GetSpecCloneDir $projectName
Expand Down

0 comments on commit 58175c5

Please sign in to comment.