Skip to content

Commit

Permalink
post_env.expand_path(load_path) in build_exe
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokaro committed Jul 8, 2024
1 parent 53d58af commit f86f66b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/ocran
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ module Ocran
if feature.absolute?
feature
elsif (load_path = find_load_path(post_env.load_path, feature))
feature.expand_path(load_path)
feature.expand_path(post_env.expand_path(load_path))
else
# This message occurs when paths for core library files (e.g., enumerator.so,
# rational.so, complex.so, fiber.so, thread.rb, ruby2_keywords.rb) are not
Expand Down Expand Up @@ -424,10 +424,10 @@ module Ocran
working_directory = Pathname(post_env.pwd)
features.each do |feature|
load_path = find_load_path(all_load_paths, feature)
if load_path.nil? || load_path.expand_path == Pathname.pwd
if load_path.nil? || (post_env.expand_path(load_path)) == Pathname.pwd
source_files << feature
else
fullpath = feature.expand_path(load_path)
fullpath = feature.expand_path(post_env.expand_path(load_path))

if fullpath.subpath?(exec_prefix)
# Features found in the Ruby installation are put in the
Expand Down Expand Up @@ -456,7 +456,7 @@ module Ocran
# when Ruby starts.
inst_sitelibdir = sitelibdir.relative_path_from(exec_prefix)
if feature.absolute?
feature = feature.relative_path_from(load_path.expand_path)
feature = feature.relative_path_from(post_env.expand_path(load_path))
end
builder.cp(fullpath, inst_sitelibdir / feature)
end
Expand Down

0 comments on commit f86f66b

Please sign in to comment.