Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 7.9.0

Merged [Pull Request](https://github.com/MethodsAndPractices/vsteam/pull/481) from [Sebastian Schütze](https://github.com/SebastianSchuetze) the following:
- fixed a bug that prevented the module to load when the user has no access to the internet.[#466](https://github.com/MethodsAndPractices/vsteam/issues/466)

Merged [Pull Request](https://github.com/MethodsAndPractices/vsteam/pull/480) from [Sebastian Schütze](https://github.com/SebastianSchuetze) the following:
- fixed a problem that prevented the module to load [#467](https://github.com/MethodsAndPractices/vsteam/issues/467)

Expand Down
16 changes: 12 additions & 4 deletions Source/Private/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,16 @@ function _getBillingToken {
function _pinpGithub {
Write-Verbose "Checking if client is online"
$pingGh = [System.Net.NetworkInformation.Ping]::new()
[System.Net.NetworkInformation.PingReply]$reply = $pingGh.Send('github.com', 150)
return $reply.Status
$replyStatus = $null
try {
[System.Net.NetworkInformation.PingReply]$reply = $pingGh.Send('github.com', 150)
$replyStatus = $reply.Status
}
catch {
$replyStatus = [System.Net.NetworkInformation.IPStatus]::Unknown
Write-Debug $_.Exception.InnerException
}
return $replyStatus
}

function _showModuleLoadingMessages {
Expand Down Expand Up @@ -1208,7 +1216,7 @@ function _showModuleLoadingMessages {
}
}
else {
Write-Debug "Client is offline. Skipping module messages"
Write-Information "Client is offline or blocked by a firewall. Skipping module messages"
}
}
}
Expand Down Expand Up @@ -1247,7 +1255,7 @@ function _checkForModuleUpdates {
}
}
else {
Write-Debug "Client is offline. Skipping module updates check"
Write-Information "Client is offline or blocked by a firewall. Skipping module updates check"
}
}

Expand Down