mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
lib/mruby/build/command.rb: skip mrbgems in parent directory; fix #6029
If `mrbgems` is included in the parent directory path (MRUBY_ROOT), it confuses gem path and build path.
This commit is contained in:
@@ -99,7 +99,11 @@ module MRuby
|
||||
gemrake = File.join(source_dir, "mrbgem.rake")
|
||||
rakedep = File.exist?(gemrake) ? [ gemrake ] : []
|
||||
|
||||
if build_dir.include? "mrbgems/"
|
||||
bd = build_dir
|
||||
if bd.start_with?(MRUBY_ROOT)
|
||||
bd = bd.sub(MRUBY_ROOT, '')
|
||||
end
|
||||
if bd.include? "mrbgems/"
|
||||
generated_file_matcher = Regexp.new("^#{Regexp.escape build_dir}/(?!mrbc/)(.*)#{Regexp.escape out_ext}$")
|
||||
else
|
||||
generated_file_matcher = Regexp.new("^#{Regexp.escape build_dir}/(?!mrbc/|mrbgems/.+/)(.*)#{Regexp.escape out_ext}$")
|
||||
|
||||
Reference in New Issue
Block a user