aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-11 22:09:26 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-11 22:09:26 -0300
commitd1108573edab9f2493ecad602c980aa8d66dd551 (patch)
tree20ffe8a8c70bf0386cf4c7ad049adb90ad2a64a8
parent0f9d259ab3a59ae0f3ab3a2992dd371a368da5aa (diff)
downloadluarocks-d1108573edab9f2493ecad602c980aa8d66dd551.tar.gz
luarocks-d1108573edab9f2493ecad602c980aa8d66dd551.tar.bz2
luarocks-d1108573edab9f2493ecad602c980aa8d66dd551.zip
Use the system-installed stat.
Avoids clashes with other versions of stat that may be installed in /usr/local, or somewhere else in the $PATH. Closes #314.
-rw-r--r--src/luarocks/cfg.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 36c2c2a4..50d247b5 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -443,6 +443,7 @@ if detected.macosx then
443 defaults.arch = "macosx-"..proc 443 defaults.arch = "macosx-"..proc
444 defaults.platforms = {"unix", "bsd", "macosx"} 444 defaults.platforms = {"unix", "bsd", "macosx"}
445 defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" 445 defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load"
446 defaults.variables.STAT = "/usr/bin/stat"
446 defaults.variables.STATFLAG = "-f '%A'" 447 defaults.variables.STATFLAG = "-f '%A'"
447 local version = io.popen("sw_vers -productVersion"):read("*l") 448 local version = io.popen("sw_vers -productVersion"):read("*l")
448 version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3 449 version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3