ruby-changes:65074
From: Kazuhiro <ko1@a...>
Date: Thu, 28 Jan 2021 18:24:40 +0900 (JST)
Subject: [ruby-changes:65074] 1b377b32c8 (master): Add fallback when PWD is not set
https://git.ruby-lang.org/ruby.git/commit/?id=1b377b32c8 From 1b377b32c8616f85c0a97e68758c5c2db83f2169 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Thu, 28 Jan 2021 18:23:13 +0900 Subject: Add fallback when PWD is not set --- spec/bundler/runtime/setup_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 09430d6..e2bed00 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1340,8 +1340,12 @@ end https://github.com/ruby/ruby/blob/trunk/spec/bundler/runtime/setup_spec.rb#L1340 # override the default gem. def load_path_exclusions_hack_for(name) if ruby_core? - # .ext/common is relative from build directory - ext_folder = Pathname(ENV["PWD"]) + ".ext/common" + if ENV.key?("PWD") + # .ext/common is relative from build directory + ext_folder = Pathname(ENV["PWD"]) + ".ext/common" + else + ext_folder = source_root.join(".ext/common") + end require_name = name.tr("-", "/") if File.exist?(ext_folder.join("#{require_name}.rb")) { :exclude_from_load_path => ext_folder.to_s } -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/