Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --quiet to CLI #8909

Open
isaacrlevin opened this issue Apr 2, 2024 · 0 comments
Open

Add --quiet to CLI #8909

isaacrlevin opened this issue Apr 2, 2024 · 0 comments
Labels
feedback needs-triage needs to be reviewed

Comments

@isaacrlevin
Copy link

isaacrlevin commented Apr 2, 2024

Based on #8377, it would be great to have the CLI quiet with specific commands, for example

$Env:Org = gh api /user | ConvertFrom-Json | Select-Object -ExpandProperty login
$ForkExists = gh api "/repos/$Env:Org/somereponame" | ConvertFrom-Json

if ($null -eq $ForkExists.id) {
    Write-Host "Forking the sample repository..."
    gh repo fork "someorg/somerepo" --default-branch-only --clone=false
}

If you run the above and the fork does not exist, you get the following message

gh: Not Found (HTTP 404)

It would be ideal if I could control the CLI that it didn't output anything, especially in this case as I might check this variable in the future. This would lead to a cleaner output which is nice in scripting scenarios.

@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback needs-triage needs to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants