Skip to content

Commit e340d78

Browse files
committed
Hide output from register/unregister ps module repository
1 parent fea2bad commit e340d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eng/common/scripts/Helpers/PSModule-Helpers.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function installModule([string]$moduleName, [string]$version, $repoUrl) {
7979
$repo = (Get-PSRepository).Where({ $_.SourceLocation -eq $repoUrl })
8080
if ($repo.Count -eq 0)
8181
{
82-
Register-PSRepository -Name $repoUrl -SourceLocation $repoUrl -InstallationPolicy Trusted
82+
Register-PSRepository -Name $repoUrl -SourceLocation $repoUrl -InstallationPolicy Trusted | Out-Null
8383
$repo = (Get-PSRepository).Where({ $_.SourceLocation -eq $repoUrl })
8484
if ($repo.Count -eq 0) {
8585
throw "Failed to register package repository $repoUrl."
@@ -104,7 +104,7 @@ function installModule([string]$moduleName, [string]$version, $repoUrl) {
104104

105105
# Unregister repository as it can cause overlap issues with `dotnet tool install`
106106
# commands using the same devops feed
107-
Unregister-PSRepository -Name $repoUrl
107+
Unregister-PSRepository -Name $repoUrl | Out-Null
108108

109109
return $modules[0]
110110
}

0 commit comments

Comments
 (0)