Disable GitHub API console output #446
Replies: 2 comments
-
For all those who may also be interested, here a solution I found: Get-GitHubRepository -OwnerName "owner" -RepositoryName "repo-name" | Out-Null |
Beta Was this translation helpful? Give feedback.
-
Correct. This is standard PowerShell behavior. You're calling a "Get" command, so you should expect that it's returning something. That's not logging however...that's the response from the command that you're calling. There are many discussions online about how to suppress the output of PowerShell commands. The most common ways are to: # Cast the command to [void]
[void]Get-GitHubRepository -OwnerName "owner" -RepositoryName "repo-name"
# Pipe to null
Get-GitHubRepository -OwnerName "owner" -RepositoryName "repo-name" | Out-Null
# Or capture to null
$null = Get-GitHubRepository -OwnerName "owner" -RepositoryName "repo-name" Logging is different. The majority of the "logging" is what you'd see if you passed-in the |
Beta Was this translation helpful? Give feedback.
-
I would like to disable the output of the GitHub API after a function is called. The
Set-GitHubConfiguration -DisableLogging
command has no effect. Is there a other way?Beta Was this translation helpful? Give feedback.
All reactions