aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/unix.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua
index f2290412..c5769bac 100644
--- a/src/luarocks/fs/unix.lua
+++ b/src/luarocks/fs/unix.lua
@@ -101,6 +101,11 @@ function is_actual_binary(filename)
101 if file then 101 if file then
102 local found = false 102 local found = false
103 local first = file:read() 103 local first = file:read()
104 if not first then
105 file:close()
106 print("Warning: could not read "..filename)
107 return false
108 end
104 if first:match("#!.*lua") then 109 if first:match("#!.*lua") then
105 file:close() 110 file:close()
106 return true 111 return true