From c803b3d96719e9246dbd2874069a5d488f2bdc6b Mon Sep 17 00:00:00 2001
From: "Tim D. Smith" <git@tim-smith.us>
Date: Tue, 7 Apr 2015 16:37:22 -0700
Subject: [PATCH] FortranDependency: make sure gfortran ends up in PATH

Per requirements.rb:

    >  XXX If the satisfy block returns a Pathname, then make sure that it
    >  remains available on the PATH. This makes requirements like
    >    satisfy { which("executable") }
    >  work, even under superenv where "executable" wouldn't normally be on the
    >  PATH.
    >  This is undocumented magic and it should be removed, but we need to add
    >  a way to declare path-based requirements that work with superenv first.

Fixes homebrew/homebrew-python#170.

Closes Homebrew/homebrew#38448.
---
 Library/Homebrew/requirements/fortran_dependency.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/Homebrew/requirements/fortran_dependency.rb b/Library/Homebrew/requirements/fortran_dependency.rb
index f68256527e..8ab4a8dce0 100644
--- a/Library/Homebrew/requirements/fortran_dependency.rb
+++ b/Library/Homebrew/requirements/fortran_dependency.rb
@@ -8,6 +8,6 @@ class FortranDependency < Requirement
   env { ENV.fortran }
 
   satisfy :build_env => false do
-    (ENV['FC'] || which('gfortran')) ? true : false
+    which(ENV["FC"] || "gfortran")
   end
 end
-- 
GitLab