We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74c26dc commit 00b8361Copy full SHA for 00b8361
1 file changed
‎scripts/main.ps1‎
@@ -1,6 +1,22 @@
1
[CmdletBinding()]
2
param()
3
4
+$retryCount = 5
5
+$retryDelay = 10
6
+for ($i = 0; $i -lt $retryCount; $i++) {
7
+ try {
8
+ Install-PSResource -Name 'PSSemVer' -TrustRepository -Repository PSGallery
9
+ break
10
+ } catch {
11
+ Write-Warning "Installation of $($psResourceParams.Name) failed with error: $_"
12
+ if ($i -eq $retryCount - 1) {
13
+ throw
14
+ }
15
+ Write-Warning "Retrying in $retryDelay seconds..."
16
+ Start-Sleep -Seconds $retryDelay
17
18
+}
19
+
20
$path = (Join-Path -Path $PSScriptRoot -ChildPath 'helpers')
21
LogGroup "Loading helper scripts from [$path]" {
22
Get-ChildItem -Path $path -Filter '*.ps1' -Recurse | ForEach-Object {
0 commit comments