aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/luarocks/fetch/git.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua
index ff66f7fe..27864989 100644
--- a/src/luarocks/fetch/git.lua
+++ b/src/luarocks/fetch/git.lua
@@ -54,7 +54,12 @@ local function git_identifier(git_cmd, ver)
54 if not (ver:match("^dev%-%d+$") or ver:match("^scm%-%d+$")) then 54 if not (ver:match("^dev%-%d+$") or ver:match("^scm%-%d+$")) then
55 return nil 55 return nil
56 end 56 end
57 local date_hash = util.popen_read(fs.Q(git_cmd).." log --pretty=format:'%ai %h' -n 1") 57 local pd = io.popen(fs.command_at(fs.current_dir(), fs.Q(git_cmd).." log --pretty=format:'%ai %h' -n 1"))
58 if not pd then
59 return nil
60 end
61 local date_hash = pd:read("*l")
62 pd:close()
58 if not date_hash then 63 if not date_hash then
59 return nil 64 return nil
60 end 65 end