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

feat: support Vscode packages updates #536

Merged
merged 4 commits into from
Aug 14, 2023
Merged

Conversation

samhanic
Copy link
Contributor

What does this PR do

Visual studio code IDE automatically updates extensions only when it is opened. It forces then to reload its windows, which is a (small but existing) annoyance.
I use Topgrade regularly with great success but observed it does not yet handle these extensions. I consequently made this PR to add this update.

Vscode extensions cli update is not trivial because no universal upgrade command exists ( a coresponding issue has been opened but not implemented). The steps I use are:

  • get list of installed extensions with code --list-extensions (obtain a line-return separated list of installed extensions)
  • construct the upgrade command and execute it
    • code --force --install-extension [ext0] --install-extension [ext1] ... --install-extension [extN]

I tested myself on Ubuntu 20.04 (including the case when no extension is installed) and on Windows 10.

Standards checklist:

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself
    • I also tested that Topgrade skips the step where needed

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants