mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
fix todos
This commit is contained in:
@@ -83,3 +83,16 @@ function Invoke-RestMethodWithRetry {
|
||||
)
|
||||
Invoke-RestMethod $Url -MaximumRetryCount 10 -RetryIntervalSec 30
|
||||
}
|
||||
|
||||
function Invoke-ExpressionWithValidation {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$Command
|
||||
)
|
||||
|
||||
$output = Invoke-Expression -Command $Command
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Command '$Command' has finished with exit code $LASTEXITCODE"
|
||||
}
|
||||
return $output
|
||||
}
|
||||
Reference in New Issue
Block a user