JetBrains Rider (on Windows) always insert some invisible character when adding new bash file
I have a very weird problem which gives me sort of frustration.. I am currently using JetBrains Rider (v 2021.2 on Windows), and I develop also some Bash scripts that must be run in a Linux system. Every time I create a new bash file, it seems like that the IDE automatically inserts some invisible control chars at the very beginning of the file... It cannot be seen in the IDE, but if I change to a Linux system, and print the file e.g. with "more" I can see that there are indeed some chars at the beginning... which causes later on errors.
This happens only with Rider, if I create e.g. a shell script with Visual Studio Code, it just works as expected...
Of course I checked that the line ending is LF (this is also the default setting in the IDE for shell scripts). For better illustration here are 2 screenshots (the first one showing a new file created in Rider, which looks good here):
And here is the second screenshot which shows how the file looks in a Linux bash environment printed with "more" (You can see that there is some invisible char the beginning that looks like a space):
Any idea what can be the reason for that?!
P.S.
I am not sure if this is the right topic here, but I didn't found any topic for the Rider IDE.
Please sign in to leave a comment.
May you show the list of custom plugins installed?
Does it help to remove the space character after shebang (
!#/bin/bash
instead of#! /bin/bash
)?Hi Konstantin,
Thanks for your reply! One of my first tests was exactly what you described, I tested to remove the space between the !# and the /bin/bash, but it didn't change anything of the described behaviour. On my former job (and also on my private machine) I use(d) IntelliJ, and I never encountered this issue so far, it is really strange...
Here is a screenshotted list of all my plugins (don't know if there exist a better possibility to print all of them):
Does it help to disable shell script plugin?
No, it doesn't change this behaviour
Reproduced that. Seems to be Rider-specific. IntelliJ IDEA works fine: https://i.imgur.com/nZw82GQ.jpg
I'll ask Rider team about that.
Yes exactly, I can also confirm that with normal IntelliJ IDEA there was no issue like this, hence I was really confused when I started to use Rider ;-)
Ah and one supplement: Today I saw that this does not only happen on Bash scripts, but also for other files like e.g. powershell scripts. So I really hope that this fixed quited soon, because this really a very annoying behaviour...
Hi Clemens Stich!
I also reproduced the case and created an issue for it: RIDER-69866. Feel free to follow it, comment or vote.
Thanks!
Hi Alexandra,
This link does not work for me and I wanted to question again if you know when there will be a bugfix shipped?
Best regards
Clemens
Hi Clemens!
Sorry for the mistake with the link. Please check, now it should work correctly.
However, unfortunately, this issue has not been scheduled for any release yet.