actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
439 stars 95 forks source link

Fix error statement when wget command is missing #272

Closed bijanvakili closed 1 year ago

bijanvakili commented 1 year ago

compile/download_deps.lua assumes wget is in the current PATH.

However, should this CLI tool be missing, it will not be able to output an error:

download_deps.lua:61: bad argument #2 to 'error' (number expected, got string)

Fixing the error message to use the correct form of the built-in error() function by concatenating the command path and the error string err.

Output becomes the following which now indicates the root cause:

compile/download_deps.lua:61: wget:subprocess::spawn: (generic:2)No such file or directory