aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2016-01-05 13:05:58 +0300
committermpeterv <mpeterval@gmail.com>2016-01-11 11:29:43 +0300
commit3766d49926771f754bcd255c9e82102cbbe6ce01 (patch)
tree9ad0320a918b48bfad0c864e37d0441e9fb85940 /src
parent12e3d413bef8e19b26e0f995ebf05ed3fdf1ef70 (diff)
downloadluarocks-3766d49926771f754bcd255c9e82102cbbe6ce01.tar.gz
luarocks-3766d49926771f754bcd255c9e82102cbbe6ce01.tar.bz2
luarocks-3766d49926771f754bcd255c9e82102cbbe6ce01.zip
luarocks make: ignore 'rockspec' directory when no argument given
Without an argument luarocks make looks if there is only one rockspec in the current directory. Consider only files as potential rockspec to avoid strange error when current directory contains a directory ending with 'rockspec'.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/make.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/make.lua b/src/luarocks/make.lua
index 1dfe6473..4f70bafe 100644
--- a/src/luarocks/make.lua
+++ b/src/luarocks/make.lua
@@ -54,7 +54,7 @@ function make.run(...)
54 54
55 if not rockspec then 55 if not rockspec then
56 for file in fs.dir() do 56 for file in fs.dir() do
57 if file:match("rockspec$") then 57 if file:match("rockspec$") and fs.is_file(file) then
58 if rockspec then 58 if rockspec then
59 return nil, "Please specify which rockspec file to use." 59 return nil, "Please specify which rockspec file to use."
60 else 60 else