Disable GitHub API console output #446
Closed
akordowski
started this conversation in
General
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 |
0 replies
|
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 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I would like to disable the output of the GitHub API after a function is called. The
Set-GitHubConfiguration -DisableLoggingcommand has no effect. Is there a other way?All reactions