Skip to content

Commit e673224

Browse files
committed
update script
1 parent 932ba54 commit e673224

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tools/BuildScripts/AdaptAutorestModule.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,16 @@ try{
240240
Write-Host "Redundant help markdown detected, removing $helpFile ..."
241241
Remove-Item $helpFile.FullName -Force
242242
}
243-
# Only try to remove the parameter if the file still exists
244-
if (Test-Path $helpFile.FullName) {
245-
Write-Host "Removing ProgressAction parameter from $helpFile ..."
246-
Remove-CommonParameterFromMarkdown -Path $helpFile.FullName -ParameterName 'ProgressAction'
247-
}
243+
Write-Host "Removing ProgressAction parameter from $helpFile ..."
244+
Remove-CommonParameterFromMarkdown -Path $helpFile.FullName -ParameterName 'ProgressAction'
248245
}
249246
& $resolveScriptPath -ModuleName $ModuleRootName -ArtifactFolder $artifacts -Psd1Folder $parentModulePath
250247
} -ArgumentList $RepoRoot, $ModuleRootName, $parentModuleName, $SubModuleName, $subModuleNameTrimmed
251-
$job | Wait-Job | Receive-Job
248+
try {
249+
$job | Wait-Job | Receive-Job
250+
} catch {
251+
Write-Warning "Error: $($_.Exception.Message)"
252+
}
252253
$job | Remove-Job
253254
} finally {
254255
if (Test-Path $tempCsprojPath) {

0 commit comments

Comments
 (0)