jdbaldry / jsonnet-language-server

A Language Server Protocol (LSP) server for Jsonnet (https://jsonnet.org).
GNU Affero General Public License v3.0
17 stars 2 forks source link

Downloadable binary crashes with `Syntax error: redirection unexpected` #36

Closed chaudum closed 2 years ago

chaudum commented 2 years ago

Executing the downloaded binary from the release page crashes.

$ cd $(mktemp -d)
$ curl -O https://github.com/jdbaldry/jsonnet-language-server/releases/download/v0.3.0/jsonnet-language-server
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   662  100   662    0     0    522      0  0:00:01  0:00:01 --:--:--   522
$ chmod +x jsonnet-language-server 
$ ./jsonnet-language-server 
./jsonnet-language-server: 1: Syntax error: redirection unexpected

Whereas the go install works as expected:

$ go install github.com/jdbaldry/jsonnet-language-server@v0.3.0
go: downloading github.com/jdbaldry/jsonnet-language-server v0.3.0
go: downloading github.com/hexops/gotextdiff v1.0.3
$ $HOME/go/bin/jsonnet-language-server 
2021/11/24 22:27:58 Starting the language server
2021/11/24 22:27:58 Using the following jpaths: []
^C
jdbaldry commented 2 years ago

I think your curl command needs -L because without it you download an HTML redirect page which your shell is not able to understand and is causing it to error.