From ab4f1047fb1a7326e64200a9f2f056c698d6edc6 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 9 Aug 2022 22:36:39 +0800 Subject: [PATCH] language/python: use versioned Python name in `detected_python_shebang` Needed for Homebrew/homebrew-core#107517. --- Library/Homebrew/language/python.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index 958dbc2487..c0297a85cb 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -111,7 +111,8 @@ module Language raise ShebangDetectionError.new("Python", "formula has multiple Python dependencies") end - python_shebang_rewrite_info(Formula[python_deps.first].opt_bin/"python3") + python_dep = python_deps.first + python_shebang_rewrite_info(Formula[python_dep].opt_bin/python_dep.sub("@", "")) end end