aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/unix.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua
index dae6259d..bc0f4594 100644
--- a/src/luarocks/fs/unix.lua
+++ b/src/luarocks/fs/unix.lua
@@ -464,7 +464,10 @@ function is_actual_binary(filename)
464 local file = io.open(filename) 464 local file = io.open(filename)
465 if file then 465 if file then
466 local found = false 466 local found = false
467 if file:read():match("#!/bin/sh") then 467 local first = file:read()
468 if first:match("#!.*lua") then
469 found = true
470 elseif first:match("#!/bin/sh") then
468 local line = file:read() 471 local line = file:read()
469 line = file:read() 472 line = file:read()
470 if not(line and line:match("LUA_PATH")) then 473 if not(line and line:match("LUA_PATH")) then