File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,10 +200,11 @@ def infer_name
200200 ""
201201 end
202202
203- sig { params ( cmd : String ) . returns ( T . nilable ( Pathname ) ) }
204- def which ( cmd )
205- super ( cmd , PATH . new ( ORIGINAL_PATHS ) )
203+ sig { override . params ( cmd : String , path : PATH :: Elements ) . returns ( T . nilable ( Pathname ) ) }
204+ def which ( cmd , path = PATH . new ( ORIGINAL_PATHS ) )
205+ super
206206 end
207+ public :which
207208
208209 class << self
209210 include BuildEnvironment ::DSL
Original file line number Diff line number Diff line change 154154 requirement . modify_build_environment
155155 end
156156 end
157+
158+ describe "#satisfy with block calling #which and :build_env set to false" do
159+ let ( :klass ) do
160+ Class . new ( described_class ) do
161+ satisfy ( build_env : false ) do
162+ which ( "sh" )
163+ end
164+ end
165+ end
166+
167+ it "does not raise an error" do
168+ expect { requirement . satisfied? } . not_to raise_error
169+ end
170+ end
157171 end
158172
159173 describe "#build?" do
You can’t perform that action at this time.
0 commit comments