Skip to content

Remote WSL cli: support installing extensions #2589

Closed

Description

I tried to install an extension in WSL2 and I received the following error.

$ code --install-extension
Ignoring option install-extension: not supported for code.

Activity

  1. aeschli commented on Mar 21, 2020

    @aeschli
    Contributor

    Yes, the code cli in WSL does not support installing extensions.
    You need to use the extension viewlet in the remote window.

  2. changed the title [-]error when trying to install extension from WSL2[/-] [+]Remote WSL cli: support installing extensions[/+] on Mar 21, 2020
  3. added
    feature-request
    wsl
    on Mar 21, 2020
  4. rapgru commented on Apr 25, 2020

    @rapgru

    Martin Aeschlimann (@aeschli) Do you know of any other method for installing extensions on a remote host? I automated my Windows setup with Boxstarter and would like to non-interactively install extensions in WSL.

    Related issues requesting similar functionality are #2749, #2704 and #2393.

  5. chatziko commented on Jul 2, 2020

    @chatziko

    Raphael Gruber (@rapgru) : just curious, did you find a workaround for this?

  6. rapgru commented on Jul 2, 2020

    @rapgru

    Kostas Chatzikokolakis (@chatziko)
    Unfortunately not, I just keep a list of extensions I have to install manually after the installation script. If you put the effort in and come up with a solution, please let me know!

  7. ZhangYuef commented on Oct 14, 2020

    @ZhangYuef

    Does anyone have ideas on this issue?

    I cannot install Python extension on a remote host by using extension viewlet.

  8. aeschli commented on Oct 14, 2020

    @aeschli
    Contributor

    Zhang Yuefeng (@ZhangYuef) Installing using the extension viewlet should work. Please file a separate issue with more details.
    This issue is about installing a remote extension through the remote cli.

  9. ZhangYuef commented on Oct 15, 2020

    @ZhangYuef

    Zhang Yuefeng (@ZhangYuef) Installing using the extension viewlet should work. Please file a separate issue with more details.
    This issue is about installing a remote extension through the remote cli.

    Thank for pointing out. I open a new issue #3853 to find help for my problem.

  10. marwan-at-work commented on Oct 27, 2020

    @marwan-at-work

    Would love to see this issue get resolved as this can unlock a lot of automation for remote development

  11. alanlivio commented on Oct 27, 2020

    @alanlivio
    Author

    I workaround this issue by create a alias to Windows binary:
    alias code="cmd.exe /c 'C:\Program Files\Microsoft VS Code\bin\code'"
    By doing this, run code --install-extension works.
    It enable automate installation of extensions but it install only the Windows side of the VS Code.
    I still need open WSL connection to enable the extensions in WSL side of the VS Code.

  12. added
    plan-review
    on Nov 20, 2020
  13. hasayakey commented on Dec 29, 2020

    @hasayakey

    easy!!! in wsl use code . to open current folder in VSCode, then Extensions->install from VSIX

  14. marwan-at-work commented on Dec 29, 2020

    @marwan-at-work

    hasayakey (@hasayakey) that is not automat-able

  15. PavelSosin-320 commented on Dec 29, 2020

    @PavelSosin-320

    This is theoretically automatable if you have Windows Pro with enabled remote execution. Ansimble can work with Windows host. If you have a strong IT team behind your back you can execute Powershell script or Playbook. Ask your corporate IT. Don't do it at home!

  16. alanlivio commented on Jan 4, 2021

    @alanlivio
    Author

    Yes hasayakey (@hasayakey) it not automatable.

  17. aeschli commented on Jan 19, 2021

    @aeschli
    Contributor

    The remote CLI in the integrated terminal of remote windows now supports:

    • code --install-extension idOrPathToVSIX in combination with --force
    • code --uninstall-extension idOrPathToVSIX in combination with --force
    • code --list-extensions in combination with --show-version and --category
  18. locked and limited conversation to collaborators on Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requeston-testplanplan-reviewwsl

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions