lib/linguist/shebang.rb in github-linguist-7.4.0 vs lib/linguist/shebang.rb in github-linguist-7.5.0

- old
+ new

@@ -56,9 +56,15 @@ if script == 'sh' && data.lines.first(5).any? { |l| l.match(/exec (\w+).+\$0.+\$@/) } script = $1 end + # osascript can be called with an optional `-l <language>` argument, which may not be a language with an interpreter. + # In this case, return and rely on the subsequent strategies to determine the language. + if script == 'osascript' + return if s.scan_until(/\-l\s?/) + end + File.basename(script) end end end