Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ruby_installer/build/components/01_msys2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def needed?(try_kill: true)
begin
autorebase

if msys.with_msys_apps_enabled(if_no_msys: :raise) { run_verbose("sh", "-lc", "true") }
if msys.with_msys_apps_enabled(if_no_msys: :raise) { system "set"; run_verbose("sh", "-lc", "set"); run_verbose("sh", "-c", "ls -la ~") }
puts "MSYS2 seems to be " + green("properly installed")
false
else
Expand Down
5 changes: 3 additions & 2 deletions lib/ruby_installer/build/components/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def shell_join(array)
def run_verbose(*args)
puts "> #{ cyan(shell_join(args)) }"
# Unset HOME, which is set by ruby.exe to HOMEDRIVE+HOMEPATH but MSYS2 has it's own HOME.
# The HOME must be missing initially to trigger MSYYS2 initialization.
system({ "HOME" => nil }, *args)
# The HOME must be missing initially to trigger MSYS2 initialization.
# POSIXLY_CORRECT is set in GHA and also blocks MSYS2 initialization.
system({ "HOME" => nil, "POSIXLY_CORRECT" => nil }, *args)
end

def puts(*args)
Expand Down
5 changes: 4 additions & 1 deletion recipes/msys2/50-init-msys.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ file self.after_init_filelist => [self.before_init_filelist] do |t|
# initialize MSYS2
RubyInstaller::Build.msys2_installation.with_msys_apps_disabled do
sh "autorebase.bat" if sandboxdir=~/\/msys32$/
sh "usr/bin/sh", "-lc", "true"
# Unset HOME, which is set by ruby.exe to HOMEDRIVE+HOMEPATH but MSYS2 has it's own HOME.
# The HOME must be missing initially to trigger MSYS2 initialization.
# POSIXLY_CORRECT is set in GHA and also blocks MSYS2 initialization.
sh({ "HOME" => nil, "POSIXLY_CORRECT" => nil }, "usr/bin/sh", "-lc", "true")
end

sh "find > #{File.basename self.after_init_filelist}"
Expand Down
Loading