Open MSP-Greg opened 4 years ago
This is right, bash is currently not fully supported - only CMD and Powershell are. There have been only a few adjustments for bash. RubyInstaller works to some extend in bash, but has known issues. In particular bash compatibility is not tested at all. And maybe recent ruby versions have worsen the support.
My assumption was, that people using bash will probably use MSYS2 or it's MINGW tools anyway, where bash support is (hopefully) better. So I focused on CMD and Powershell first.
Nevertheless if there is some greater demand in better bash support, I'm open to add it. Most things should be fixable straightforward. The hard issues that come to mind are
ridk enable
and ridk disable
(env vars can not be changed by a subprocess)I think there's two issues here.
Do the bash scripts located in the bin folder run. That is the main issue I'm concerned with. The script issues are what are showing as failures in the CI run I linked to.
Can irb, byebug, etc be used in a bash terminal. I rarely use either, so I don't know. I did run the reline tests in my Windows Terminal MSYS2 window, and they all passed.
You're probably aware, but I believe that anytime Windows Ruby 'shells out', it uses the cmd shell, regardless of what shell it was started in.
Recently was working on adding the MSYS2 shell to GitHub Actions, allowing CI to run from bash scripts. This isn't common, but there are some repos with their CI tied to bash scripts, so I started testing Ruby builds using it.
Ruby 2.3.3's rake script's shebang line is the following:
Also, Ruby 2.7.1-1 has a rake issue, and ruby-head is missing bundle/bundler scripts, along with other scripts that cause some err output; all bad scripts do not start with a shebang line.
This is kind of a ruby/ruby issue, but adjusting the scripts isn't difficult. Any thoughts?
See: https://github.com/MSP-Greg/ruby-setup-ruby/runs/839007970