requirement: prepend rather than append PATH.
Otherwise this ends up behind e.g. `/usr/bin` so is pretty useless.
This commit is contained in:
parent
302bc8be22
commit
c843fd2f12
@ -95,7 +95,7 @@ class Requirement
|
|||||||
parent = satisfied_result_parent
|
parent = satisfied_result_parent
|
||||||
return unless parent
|
return unless parent
|
||||||
return if PATH.new(ENV["PATH"]).include?(parent.to_s)
|
return if PATH.new(ENV["PATH"]).include?(parent.to_s)
|
||||||
ENV.append_path("PATH", parent)
|
ENV.prepend_path("PATH", parent)
|
||||||
end
|
end
|
||||||
|
|
||||||
def env
|
def env
|
||||||
|
|||||||
@ -138,7 +138,7 @@ describe Requirement do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "infers path from #satisfy result" do
|
it "infers path from #satisfy result" do
|
||||||
expect(ENV).to receive(:append_path).with("PATH", Pathname.new("/foo/bar"))
|
expect(ENV).to receive(:prepend_path).with("PATH", Pathname.new("/foo/bar"))
|
||||||
subject.satisfied?
|
subject.satisfied?
|
||||||
subject.modify_build_environment
|
subject.modify_build_environment
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user