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

Avoid network calls during autocomplete initialization #498

Open
joelmarty opened this issue Jan 30, 2023 · 2 comments
Open

Avoid network calls during autocomplete initialization #498

joelmarty opened this issue Jan 30, 2023 · 2 comments
Labels
triage queue Issue is in our internal backlog. It's either a bug or a feature enhancement. type: community enhancement feature request not on Twilio's roadmap

Comments

@joelmarty
Copy link

joelmarty commented Jan 30, 2023

Autocompletion script is triggering update checks

I have the autocomplete setup in my .zshrc as instructed by the CLI when running twilio autocomplete zsh:

eval $(twilio autocomplete:script zsh)

However each time I start my shell, I get this reminder that there is an update available:

 ›   Warning: twilio-cli update available from 5.3.2 to 5.3.3. For more information: https://twil.io/cli

It should probably be disabled in this case as this update check:

  • Makes a network call and slows shell initialization down when ZSH is evaluating .zshrc.
  • Is not very useful when the CLI is installed through a package manager that is taking care of keeping the CLI updated.

So either disabling the check in this particular context or having a configuration parameter to disable update checks globally (and as a bonus, set it to not execute checks when the CLI is installed through a package manager) would solve this.

Steps to Reproduce

  1. Follow autocomplete setup instructions.
  2. Open a shell when an update is ready.
  3. Wait...and see the reminder

Technical details:

  • twilio-cli version: twilio-cli/5.3.2 darwin-x64
  • node version: node-v19.0.0
  • Command output with debug logging enabled (adding -l debug to the end of the command): N/A
@shrutiburman
Copy link
Contributor

Hi @joelmarty ! Thanks for the suggestion. Currently, we have n number of ways in which a user can install CLI, it could be via major package managers of different OSes, or via downloadable executables. We have generically applied this autoupdate-reminder, irrespective of the source of installation. I doubt our autoupdate plugin is aware of the installation source of CLI.
We'd add this as a feature request to our internal backlog to be prioritised. Pull requests and +1s on the feature request will help it move up the backlog.

@shrutiburman shrutiburman added triage queue Issue is in our internal backlog. It's either a bug or a feature enhancement. type: community enhancement feature request not on Twilio's roadmap labels Jan 30, 2023
@joelmarty
Copy link
Author

I am happy with a configuration setting or an environment variable that disables it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage queue Issue is in our internal backlog. It's either a bug or a feature enhancement. type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

2 participants