Fix python: detected_python_shebang python pattern
"python@" is not a valid dependency, must include something after the "@"
This commit is contained in:
parent
0a72a4148d
commit
132b763242
@ -115,7 +115,7 @@ module Language
|
|||||||
python_path = if use_python_from_path
|
python_path = if use_python_from_path
|
||||||
"/usr/bin/env python3"
|
"/usr/bin/env python3"
|
||||||
else
|
else
|
||||||
python_deps = formula.deps.map(&:name).grep(/^python(@.*)?$/)
|
python_deps = formula.deps.map(&:name).grep(/^python(@.+)?$/)
|
||||||
raise ShebangDetectionError.new("Python", "formula does not depend on Python") if python_deps.empty?
|
raise ShebangDetectionError.new("Python", "formula does not depend on Python") if python_deps.empty?
|
||||||
if python_deps.length > 1
|
if python_deps.length > 1
|
||||||
raise ShebangDetectionError.new("Python", "formula has multiple Python dependencies")
|
raise ShebangDetectionError.new("Python", "formula has multiple Python dependencies")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user