mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Allow blob data to be nil
This commit is contained in:
@@ -84,7 +84,7 @@ module Linguist
|
||||
def shebang_script
|
||||
return if !text? || large?
|
||||
|
||||
if (match = data.match(/(.+)\n?/)) && (bang = match[0]) =~ /^#!/
|
||||
if data && (match = data.match(/(.+)\n?/)) && (bang = match[0]) =~ /^#!/
|
||||
bang.sub!(/^#! /, '#!')
|
||||
tokens = bang.split(' ')
|
||||
pieces = tokens.first.split('/')
|
||||
|
||||
Reference in New Issue
Block a user