language/python: use versioned Python name in detected_python_shebang

Needed for Homebrew/homebrew-core#107517.
This commit is contained in:
Carlo Cabrera 2022-08-09 22:36:39 +08:00
parent 7fcc30c56b
commit ab4f1047fb
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -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