pocco81 / dap-buddy.nvim

🐞 Debug Adapter Protocol manager for Neovim
GNU General Public License v3.0
400 stars 48 forks source link

`:DIInstall ccppr_vsc` complains wget is missing URL #58

Open starptr opened 2 years ago

starptr commented 2 years ago

I ran :DIInstall ccppr_vsc and wget complains of missing URL image

Strangely, this only happens on an ssh box running Ubuntu 18.04.6 LTS; this did not occur on my OS X machine.

tomasgareau commented 2 years ago

I think this was introduced by #51 -- it added a proxy setting to the ccppr_vsc installer that, when unset (the default), changed the install command to something like:

wget -e https_proxy=false $(curl -s https://blah -x false | grep ...)

with -x false, the curl subcommand fails to fetch the URL & wget doesn't get passed anything.

59 should fix that!

agentzhao commented 2 years ago

Hi,

I've updated to the latest version - Merge pull request #59 from tomasgareau/main, but still facing this issue for ccppr_vsc

I'm running neovim 0.6.1 on wsl 2 Ubuntu 20.04

wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

[Process exited 1]

I've managed to install python and chrome successfully, not sure if it's the same issue

tomasgareau commented 2 years ago

Hi @agentzhao -- looks like microsoft/vscode-cpptools has removed the offline installers that DAPInstall.nvim is trying to install as of version 1.8.2: https://github.com/microsoft/vscode-cpptools/discussions/8759

DAPInstall was running the following curl command to determine the URL to pass to wget:

curl -s https://api.github.com/repos/microsoft/vscode-cpptools/releases/latest | grep browser_ | cut -d\" -f 4 | grep linux.vsix

but since https://api.github.com/repos/microsoft/vscode-cpptools/releases/latest is now pointing to 1.8.2, there is no cpptools-linux.vsix to download, causing that wget error you saw above.

In a pinch for now you could probably change this line:

https://github.com/Pocco81/DAPInstall.nvim/blob/24923c3819a450a772bb8f675926d530e829665f/lua/dap-install/core/debuggers/ccppr_vsc.lua#L50

to:

wget https://github.com/microsoft/vscode-cpptools/releases/download/1.8.1/cpptools-linux.vsix

which would install version 1.8.1.

You can find the installed plugin & edit that line directly in your neovim data directory if you wanted to do a quick test. Try :help base-directories to find the data directory for your platform: for unix, it should be ~/.local/share/nvim, for windows, ~/AppData/Local/nvim-data.


Longer term, this installer will probably need to be edited to pull the latest files from Marketplace but I'm not super familiar with the ccppr_vsc debugger.

agentzhao commented 2 years ago

thanks for the quick reply!