Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions GitHubCore.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,12 @@ function Invoke-GHRestMethod
}
}

# Disable Progress Bar in function scope during Invoke-WebRequest
$ProgressPreference = 'SilentlyContinue'

[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
$result = Invoke-WebRequest @params

if ($Method -eq 'Delete')
{
Write-Log -Message "Successfully removed." -Level Verbose
Expand Down Expand Up @@ -265,6 +269,9 @@ function Invoke-GHRestMethod

try
{
# Disable Progress Bar in function scope during Invoke-WebRequest
$ProgressPreference = 'SilentlyContinue'

[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
Invoke-WebRequest @params
}
Expand Down
6 changes: 6 additions & 0 deletions Telemetry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ function Invoke-SendTelemetryEvent
$params.Add("TimeoutSec", (Get-GitHubConfiguration -Name WebRequestTimeoutSec))
$params.Add("Body", $bodyAsBytes)

# Disable Progress Bar in function scope during Invoke-WebRequest
$ProgressPreference = 'SilentlyContinue'

$result = Invoke-WebRequest @params
}
}
Expand Down Expand Up @@ -211,6 +214,9 @@ function Invoke-SendTelemetryEvent

try
{
# Disable Progress Bar in function scope during Invoke-WebRequest
$ProgressPreference = 'SilentlyContinue'

Invoke-WebRequest @params
}
catch [System.Net.WebException]
Expand Down