mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-24 16:21:14 -03:00
If osascript is called with argument -l it could be different language so do not relay on it
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
This commit is contained in:
parent
ee9d089406
commit
a4cf6d2ef1
@ -319,6 +319,12 @@ func getInterpreter(data []byte) (interpreter string) {
|
|||||||
interpreter = interpreter[:strings.Index(interpreter, `.`)]
|
interpreter = interpreter[:strings.Index(interpreter, `.`)]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If osascript is called with argument -l it could be different language so do not relay on it
|
||||||
|
// To match linguist behaviour, see ref https://github.com/github/linguist/blob/d95bae794576ab0ef2fcb41a39eb61ea5302c5b5/lib/linguist/shebang.rb#L63
|
||||||
|
if interpreter == "osascript" && bytes.Contains(line, []byte("-l")) {
|
||||||
|
interpreter = ""
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user