fix(rubygems)

closes #3691

sed is safer than patch
This commit is contained in:
Jacob Heider 2023-10-18 18:17:28 -04:00 committed by Jacob Heider
parent bf71dad0b0
commit 7e73599206
2 changed files with 4 additions and 9 deletions

View file

@ -173,12 +173,3 @@ index 8fef455..3ef4e30 100644
@plugins_dir = Gem.plugindir(gem_home) @plugins_dir = Gem.plugindir(gem_home)
check_that_user_bin_dir_is_in_path check_that_user_bin_dir_is_in_path
end end
@@ -955,7 +955,7 @@ def write_cache_file
def ensure_writable_dir(dir) # :nodoc:
begin
- Dir.mkdir dir, *[options[:dir_mode] && 0755].compact
+ FileUtils.mkdir_p dir, *[options[:dir_mode] && 0755].compact
rescue SystemCallError
raise unless File.directory? dir
end

View file

@ -30,6 +30,10 @@ build:
patch -p1 < "$SRCROOT"/props/fit-n-finish.patch patch -p1 < "$SRCROOT"/props/fit-n-finish.patch
patch -p1 < "$SRCROOT"/props/fit-n-finish.2.patch patch -p1 < "$SRCROOT"/props/fit-n-finish.2.patch
working-directory: ${{prefix}} working-directory: ${{prefix}}
- run: |
sed -i.bak -e 's/Dir\.mkdir dir, \*\[options\[:dir_mode\].*/FileUtils.mkdir_p dir, *[options[:dir_mode] \&\& 0o755].compact/' installer.rb
rm installer.rb.bak
working-directory: ${{prefix}}/lib/rubygems
# these are provided by ruby-lang.org # these are provided by ruby-lang.org
# we dont know why they turn up here too… # we dont know why they turn up here too…