Closed gabrieljoelc closed 4 years ago
How strange.
Does the script get any further if you skip that function by passing in the version?
:OmniSharpInstall v1.37.0
What shell are you using in your WSL terminal?
Does the script get any further if you skip that function by passing in the version?
Good idea on trying different version. i didn't try that. unfortunately, I get the same error with both:
:OmniSharpInstall v1.37.0
and from the docs about WSL limitations:
:OmniSharpInstall v1.35.2
What shell are you using in your WSL terminal?
I am using zsh
:
$ zsh --version
zsh --version
zsh 5.3.1 (x86_64-debian-linux-gnu)
The script is invoked using /bin/sh
- what is that linked to on your system? /bin/sh --version
?
@gabrieljoelc I just updated the script slightly and simplified the conditionals. Can you check to see whether your system likes this version any better?
just tried latest with both versions above and got the same error.
oh interesting.sh --version
isn't working:
/bin/sh --version
/bin/sh --version
/bin/sh: 0: Illegal option --
tried searching the interwebs for other ways to check sh
version but haven't found it yet.
you could try ls -l /bin/sh
too
Which Linux distro are you using in WSL2? Ubuntu?
you could try ls -l /bin/sh too
~ ls -l /bin/sh lrwxrwxrwx 1 root root 4 Jan 23 2017 /bin/sh -> dash ~ apt-cache policy dash dash: Installed: 0.5.8-2.4 Candidate: 0.5.8-2.4 Version table: *** 0.5.8-2.4 500 500 http://deb.debian.org/debian stretch/main amd64 Packages 100 /var/lib/dpkg/status
Which Linux distro are you using in WSL2? Ubuntu?
~ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.5 (stretch) Release: 9.5 Codename: stretch
Odd, Dash is also the default shell on Ubuntu, so the script should work on Dash.
I found this Stack Overflow question which seems to be similar, so it could be caused by newline characters.
Maybe try removing and re-downloading OmniSharp-vim from inside WSL?
I also having this error. I try everything with coc, mono, translate_cygwin_ws; but I can't make it work.
Although now, for linting I use ALE but the auto-completion is still not there. Is there something I don't know that I should do to make it working for me? I want to learn unity and it's too hard for me to use other editors other than using (n)vim.
this is embarrassing. :facepalm: i just used the same command given by @nickspoons in https://github.com/OmniSharp/omnisharp-vim/issues/506#issuecomment-561918936 (I opened that issue) and it worked.
i must have a systemic issue with my git configs. 😬
To be clear, here were the steps:
/home/myuserpath/.vim/bundle/omnisharp-vim/installer/omnisharp-manager.sh
:w ++ff=unix
on the file@jeeeem, that seems to be a different issue, could you open a new issue for it instead.
Ha ha, how funny to see the same names in the thread, nearly a year later.
To quote myself from that thread:
Ah excellent, always nice to get a resolution!
@gabrieljoelc now that the installer ran for you, can you tell me if OmniSharp-vim is working correctly for you in WSL2? I haven't been able to test that environment yet, but I've heard one report of it not working - I'm really keen to learn whether it's WSL2 that is the problem for this other user, or if they have something else going on?
@nickspoons i'll give it a go this week.
I am gonna say there is most likely something up with WSL2. I have tried many different combinations I could think of to get it working but no dice. I swapped it to WSL1 and suddently everything worked like a charm. I am happy to open an issue for this and work through what ever needs to be done to help out but I am quite new to vim-land and might need a bit of extra explaining for some things :)
Oh ? I didn't have a problem with WSL2. omnisharp-roslyn got installed nicely from :OmniSharpInstall
.
I swapped it to WSL1 and suddently everything worked like a charm
This tends to mean that the files were on the windows side. Were your source code on wsl or on windows?
I ran the command from a vim installed on the wsl2 side, on a file that was stored on the wsl2 side.
With a fresh install of omnisharp-vim, I answer "yes" to install the roslyn server the first time and get this error:
I have both
curl
andwget
installed which isn't the issue anyway since it doesn't like the syntax for some reason.I ran the body of
get_latest_version()
method directly in my terminal and it worked. 🤷♂️I also tried running the script directly in the terminal and get the same error.