Closed bgs113 closed 2 years ago
I am also experiencing this problem. With no GitHub CLI extensions installed; gh
returns an error and topgrade
stops. Ideally, topgrade
should only attempt to update GitHub extensions when extensions are actually installed. Something like gh extension list && gh extension upgrade --all || return 0
would fix this.
As a quick workaround add github_cli_extensions
to ~/.config/topgrade.toml
's disable
section.
Here is mine for reference:
disable = ["vim", "gem", 'containers', 'github_cli_extensions']
@morganmay thanks for clarifying. I'll submit a fix as you suggested.
For reference, there is an issue and a PR in the GitHub CLI repo, which should make the gh
CLI not exit with an error if no extension exists: https://github.com/cli/cli/issues/5348.
Update: the PR has been merged and is now available as of GitHub CLI 2.7.0
What did you expect to happen?
When running
topgrade
with thegh
CLI tool, it will report success if no upgrades are needed or no extensions are installed. While thegh extension upgrade --all
command reports an error code of1
if no extensions are installed, topgrade should handle that condition and not fail the step.What actually happened?
When running without any
gh
extensions installed, the upgrade process reports an error:In the summary, it also reports an error:
Github CLI Extensions: FAILED
Additional details
gh extension upgrade --all
outputs an exit code of1
when no extensions are found