nvim-unity icon indicating copy to clipboard operation
nvim-unity copied to clipboard

Windows carriage-returns in NvimUnity application

Open SanTeeg0 opened this issue 1 year ago • 6 comments

It appears that underlying bash script nvimunity.sh from the Linux AppImage is using windows carriage-returns. It causes application to instantly crash with error execv error: No such file or directory. If i manually change carriage-returns for unix compatible ones, application runs as expected.

It is also possible that same bug could be happening in MacOS application.

SanTeeg0 avatar May 15 '25 14:05 SanTeeg0

The problem is in the unity package(nvim-unity) or in the standalone?

apyra avatar May 15 '25 15:05 apyra

Yep, standalone. Haven't seen it has own repo.

SanTeeg0 avatar May 15 '25 17:05 SanTeeg0

Cant you point up the problem there if you can, maybe a pr? Thanks!

Obter o Outlook para Androidhttps://aka.ms/AAb9ysg


From: SanŦeeg0 @.> Sent: Thursday, May 15, 2025 2:34:18 PM To: apyra/nvim-unity @.> Cc: apyra @.>; Comment @.> Subject: Re: [apyra/nvim-unity] Windows carriage-returns in NvimUnity application (Issue #2)

[https://avatars.githubusercontent.com/u/142804744?s=20&v=4]SanTeeg0 left a comment (apyra/nvim-unity#2)https://github.com/apyra/nvim-unity/issues/2#issuecomment-2884580206

Yep, standalone. Haven't seen it has own repo.

— Reply to this email directly, view it on GitHubhttps://github.com/apyra/nvim-unity/issues/2#issuecomment-2884580206, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BPZ36M3EOTNVIILYEG4GYFT26TFZVAVCNFSM6AAAAAB5GH45Y2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOBUGU4DAMRQGY. You are receiving this because you commented.Message ID: @.***>

apyra avatar May 15 '25 17:05 apyra

Sorry for delayed response, its been a quite busy few days.

It seems that nvimunity.sh script from standalone repo doesnt have this problem. I can easily just chmod script and run. No windows carriage-returns as well.

So here is more detailed explanation about process of getting this error.

  1. Download AppImage build of standalone application for Linux from the README
  2. Allow AppImage execution chmod u+x nvimunity-linux.AppImage
  3. Try to run the application ./nvimunity-linux.AppImage
  4. Get execv error: No such file or directory
  5. Extract AppImage contents ./nvimunity-linux.AppImage --appimage-extract
  6. Find out that scripts squashfs-root/usr/bin/nvimunity.sh and squashfs-root/AppDir/usr/bin/nvimunity.sh has windows carriage-returns

SanTeeg0 avatar May 17 '25 11:05 SanTeeg0

This issue is due to CR & CRLF incompatibility. Simply use dos2unix on the script itself to fix this. I have explained this in my blog post here -> https://blog.saladin.pro/unity-neovim-setup-ft-nix

@SanTeeg0

Saladin1812 avatar Oct 22 '25 17:10 Saladin1812

Great blog post, thanks!

apyra avatar Oct 22 '25 17:10 apyra