microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.27k stars 28.57k forks source link

[wsl] Use curl instead of wget to download VS Code server #221851

Open brettcannon opened 1 month ago

brettcannon commented 1 month ago

I use wcurl/curl and not wget, but VS Code requires I keep wget installed to install the VS Code server. I suspect curl is more widely installed than wget, so if it could use curl instead that would be nice.

roblourens commented 1 month ago

Is this Remote-SSH or another remote extension? SSH tries wget, and falls back to curl. Is it failing to fall back? Can you share the log?

brettcannon commented 1 month ago

It's WSL.

brettcannon commented 1 month ago
➲ code-insiders
Updating VS Code Server to version 50560b991207e2bb70a6e177f2c2e88949a01e6c
Removing previous installation...
ERROR: Failed to download the VS Code server. 'wget' not installed.
Please install wget:
Debian/Ubuntu: sudo apt-get install wget
vs-code-engineering[bot] commented 1 month ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

enihcam commented 1 month ago

VSCode requires particular option of wget which is not available. We need support of attempting with multiple downloaders, or at least configurable.

[11:16:21.873] Platform: linux
[11:16:21.890] > /bin/bash
[11:16:21.890] Shell: bash
[11:16:21.890] Creating bash subshell inside "bash"
[11:16:21.906] > bash version:  4.2.46(1)-release-by_linux22_v1005
[11:16:21.926] > 64328aa73d74: running
[11:16:21.940] > Installing to /root/.vscode-server...
[11:16:21.944] > 64328aa73d74%%1%%
[11:16:21.947] > Downloading with wget
[11:16:21.951] > wget download failed
> wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try `wget --help' for more options.
wynnw commented 1 month ago

Looks like it works with wget v1.21.4, but not with wget 1.14 (those are the versions on ubuntu 24.04 vs amazonlinux2 respectively). One more way to try and kick us off the old platforms ! ;)

If I just delete wget from my system then vscode remote ssh startup works fine.

enihcam commented 1 month ago

If I just delete wget from my system then vscode remote ssh startup works fine.

vscode tries curl if wget is not found.

aeschli commented 1 month ago

Please note, this issue is about the WSL extension, not 'Remote SSH'. Please file a new issue if you have problems with wget or curl when opening a Remote SSH window.

aeschli commented 1 month ago

@brettcannon What distro are you using? Is it one from the Microsoft Store?

enihcam commented 1 month ago

Please note, this issue is about the WSL extension, not 'Remote SSH'. Please file a new issue if you have problems with wget or curl when opening a Remote SSH window.

@roblourens

brettcannon commented 3 weeks ago

@aeschli Debian from the Microsoft Store.

gabrielpan147 commented 2 weeks ago

Hello, I'm using a Mac with M2 chips trying to connect to our remote server and facing the same issue. Downloading vscode server with wget failed with wget download failed > wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try wget --help' for more options.. It worked fine before so I suspect it is related to a recent update of vscode or remoteSSH.

gabrielpan147 commented 2 weeks ago

Hello, I'm using a Mac with M2 chips trying to connect to our remote server and facing the same issue. Downloading vscode server with wget failed with wget download failed > wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try wget --help' for more options.. It worked fine before so I suspect it is related to a recent update of vscode or remoteSSH.

Fixed by rollback Remote-SSH version