-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a patch for RubyInstaller to avoid crash on start up
When a non-ASCII key exists under the registry key `SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/`, Fluentd fails to start workers due to `Encoding::UndefinedConversionError`. This patch avoid this issue. Fix #616 Signed-off-by: Takuro Ashie <ashie@clear-code.com>
- Loading branch information
Showing
3 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...age/patches/rubyinstaller/0001-Skip-searching-registry-for-detecting-MSYS2-installa.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 8616bc218e6461f977c78d1a8028a7c4ab2b4ece Mon Sep 17 00:00:00 2001 | ||
From: Takuro Ashie <ashie@clear-code.com> | ||
Date: Fri, 16 Feb 2024 13:50:04 +0900 | ||
Subject: [PATCH] Skip searching registry for detecting MSYS2 installation | ||
|
||
It causes crash when the registry key contains a non-ASCII subkey and | ||
ruby is executed with '-Eascii-8bit:ascii-8bit'. | ||
In addition, make sure to eliminate influences of external MSYS2. | ||
|
||
Signed-off-by: Takuro Ashie <ashie@clear-code.com> | ||
--- | ||
.../3.2.0/ruby_installer/runtime/msys2_installation.rb | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/lib/ruby/site_ruby/3.2.0/ruby_installer/runtime/msys2_installation.rb b/lib/ruby/site_ruby/3.2.0/ruby_installer/runtime/msys2_installation.rb | ||
index ae1db823..062d10bf 100644 | ||
--- a/lib/ruby/site_ruby/3.2.0/ruby_installer/runtime/msys2_installation.rb | ||
+++ b/lib/ruby/site_ruby/3.2.0/ruby_installer/runtime/msys2_installation.rb | ||
@@ -62,6 +62,7 @@ module Runtime # Rewrite from D:/a/rubyinstaller2/rubyinstaller2/lib/ruby_instal | ||
yield "c:/msys64" | ||
yield "c:/msys32" | ||
|
||
+=begin | ||
# If msys2 is installed per installer.exe | ||
require "win32/registry" | ||
[ | ||
@@ -86,6 +87,7 @@ module Runtime # Rewrite from D:/a/rubyinstaller2/rubyinstaller2/lib/ruby_instal | ||
rescue Win32::Registry::Error | ||
end | ||
end | ||
+=end | ||
|
||
ENV['PATH'] && ENV['PATH'].split(";").each do |path| | ||
# If /path/to/msys64 is in the PATH (e.g. Chocolatey) | ||
-- | ||
2.34.1 | ||
|