Skip to content
Snippets Groups Projects
Unverified Commit 30c4383e authored by Michka Popoff's avatar Michka Popoff Committed by GitHub
Browse files

Merge pull request #7141 from iMichka/regex

rewrite_python_shebang: make version part optional
parents a0cdfe17 cccd8d36
No related branches found
No related tags found
No related merge requests found
......@@ -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?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment