mirror of
https://github.com/gosticks/brew.git
synced 2026-08-16 14:40:22 +00:00
rewrite_python_shebang: make version part optional
We forgot about the simplest case: /usr/bin/env python
This commit is contained in:
@@ -88,7 +88,7 @@ module Language
|
||||
end
|
||||
|
||||
def self.rewrite_python_shebang(python_path)
|
||||
regex = %r{^#! ?/usr/bin/(env )?python([23](\.\d{1,2})?)$}
|
||||
regex = %r{^#! ?/usr/bin/(env )?python([23](\.\d{1,2})?)?$}
|
||||
maximum_regex_length = 28 # the length of "#! /usr/bin/env pythonx.yyy$"
|
||||
Pathname(".").find do |f|
|
||||
next unless f.file?
|
||||
|
||||
Reference in New Issue
Block a user