-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Incorrect message when checking for extension upgrades #8535
Comments
After reviewing some code, I think it may just be better to not display any tty message after running the command with |
@ngoue Thanks for writing in. I was able to reproduce this bug, definitely a confusing message. Rather than change the output completely, I think we can just fix this message to instead state that there were no extensions that needed to be upgraded. |
Can I work on this one? |
This has been bugging me since ever and I needed to add this workaround to my crontab entry that monitors updates: Also trailing message in interactive mode (when the output is not piped) is confusing: > gh extension upgrade --dry-run --all
[…]
[userfetch]: already up to date
[users]: already up to date
[webhook]: already up to date
✓ Would have upgraded extensions
> gh extension upgrade --dry-run --all | egrep -v ": already up to date$" -c
0 The |
This is a very confusing help message. What it means is "Only display upgrades (rather than actually applying the upgrade)". The other part is the bug that this issue is capturing. Just to double check, is the purpose of your cron job simply to determine whether and extensions could be upgraded? |
Yep, exactly (assuming you mean any rather than and). It simply reports whether any of extensions need upgrading (by listing those that need upgrading) so that an operator can decide what to do with this information. |
Describe the bug
When checking for an extension upgrade with the
--dry-run
flag,cli
incorrectly reports that the extensions would have upgraded even though it reports it's already up-to-date in the same message.I believe this change is related: 88cae9f
Steps to reproduce the behavior
cli
version 2.40.1 (2023-12-13)gh extension install HaywardMorihara/gh-tidy
gh extension upgrade HaywardMorihara/gh-tidy --dry-run
Expected vs actual behavior
I would expect a message indicating the package is up-to-date instead of a message saying the extension would have upgraded.
Logs
The text was updated successfully, but these errors were encountered: