eruizc-dev / jdtls-launcher

The simplest way to install and launch JDTLS
MIT License
77 stars 6 forks source link

fix: use `--output` instead of shell redirection for curl #17

Closed christianfosli closed 2 years ago

christianfosli commented 2 years ago

Problem

When I run the install script I get an error when trying to uncompress the jdtls download. Afterwards some of the jar files are missing in ~/.local/opt/jdtls-launcher/jdtls/plugins/

Full logs
[cfosli]$ curl https://raw.githubusercontent.com/eruizc-dev/jdtls-launcher/master/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1474  100  1474    0     0  13493      0 --:--:-- --:--:-- --:--:-- 13648
INFO: Downloading JDTLS-LAUNCHER
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  5089    0  5089    0     0   7940      0 --:--:-- --:--:-- --:--:--     0

INFO: Extracting JDTLS-LAUNCHER
INFO: Creating symlink at /home/cfosli/.local/bin/jdtls
Installing jdtls...
jdt-language-server-1.12.0-202205230356 is going to be installed
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   162  100   162    0     0    618      0 --:--:-- --:--:-- --:--:--   620
100 45.8M  100 45.8M    0     0  7339k      0  0:00:06  0:00:06 --:--:-- 9935k

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Installing lombok...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1925k  100 1925k    0     0  1405k      0  0:00:01  0:00:01 --:--:-- 1404k
Lombok installation succesfull
JDTLS installation succesfull
INFO: Installation successful
INFO: Ensure /home/cfosli/.local/bin is in path

Solution

It works fine if I change shell redirection > to use the --output option in curl. I'm assuming the file content contained some special character that my shell interpreted wrongly, or something like that.

eruizc-dev commented 2 years ago

Thanks for the Pull Request! I will merge this and be part of the next release