Skip to content

Fixed launch jruby in MSYS2 environment#7601

Merged
headius merged 1 commit intojruby:masterfrom
knovok:launch_in_msys2
Jan 29, 2023
Merged

Fixed launch jruby in MSYS2 environment#7601
headius merged 1 commit intojruby:masterfrom
knovok:launch_in_msys2

Conversation

@knovok
Copy link
Contributor

@knovok knovok commented Jan 26, 2023

I'm using MSYS2 environment.
jruby.exe is launched not from current directory but globally in system. Even if you run it from current directory, there will be no effect because jruby.exe does nothing but returns code 0.
In PR #37 was added launch jruby.exe of MSYS, but this is the first version of MSYS not MSYS2.

@headius
Copy link
Member

headius commented Jan 27, 2023

Thank you! I have no way to evaluate this right now, but it appears to be low risk to anything other than cygwin/mingw environments, which @knovok is clearly using. I assume this patch still works on msys?

@knovok
Copy link
Contributor Author

knovok commented Jan 28, 2023

I tried not to hook other environments other than MSYS2. Cygwin should not break, as well as MSYS. The fix checks the environment ID from the /etc/os-release file. Even if the file does not exist (which should not be https://0pointer.de/blog/projects/os-release.html), the implementation will run without the patch.

@headius
Copy link
Member

headius commented Jan 29, 2023

Ok we'll go for it! Thanks!

@headius headius merged commit e6740f9 into jruby:master Jan 29, 2023
@headius headius added this to the JRuby 9.4.1.0 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants