puppetlabs / puppet-editor-services

Puppet Language Server for editors
Apache License 2.0
46 stars 21 forks source link

DOS-like line endings in release executables #318

Closed williamboman closed 1 year ago

williamboman commented 2 years ago

Describe the Bug

Starting in the 1.3.0 release, it seems like the bundled executables come with DOS-like line endings. This causes some issues when running on POSIX systems, for example interpreting the shebang incorrectly:

$ ./puppet-languageserver
env: ruby\r: No such file or directory

Expected Behavior

Unix-like line endings!

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to https://github.com/puppetlabs/puppet-editor-services/releases
  2. Download the either the .zip or .tar.gz from the 1.3.0 release.
  3. Unpack the archive.
  4. Review the line endings of the puppet-* scripts.

Environment

dpmmb commented 2 years ago

As a work-around you can run dos2unix or similar on puppet-languageserver.

acsezen commented 2 years ago

Hello, dos2unix just convert the problem to this one;

.../vim/lsp/rpc.lua:420 "rpc" "puppet-languageserver" "stderr" "<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:inrequire': cannot load such file -- puppet_languageserver (LoadError)\n\tfrom <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'\n\tfrom /home/asezen/.local/share/nvim/mason/bin/puppet-languageserver:11:in <main>\n

I installed puppet-languageserver with mason.

Thanks

madelaney commented 1 year ago

I have the same problem.

bit0rez commented 1 year ago

I have the same problem. Looks like a bug in $LOAD_PATH for dependencies. This is reproduced when I using a link to puppet-languageserver instead of starting it from the installation directory.

LukasAud commented 1 year ago

Hi @williamboman, it looks like there was a Pull Request (#326) merged a couple of months ago that was described as a fix for this issue. Can you confirm whether this issue is still active or has been addressed?

williamboman commented 1 year ago

Seems fine now :+1: