diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-02 17:05:59 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-02 17:05:59 -0200 |
commit | 24b814a6507c6e122c41b666c120157e1da5f521 (patch) | |
tree | 3472209b9fab72a42b2d0fcc0d92be314d3832e2 | |
parent | 63637cc8a1cbf4b2809cf17ea85e12f6569a726e (diff) | |
download | luarocks-24b814a6507c6e122c41b666c120157e1da5f521.tar.gz luarocks-24b814a6507c6e122c41b666c120157e1da5f521.tar.bz2 luarocks-24b814a6507c6e122c41b666c120157e1da5f521.zip |
Make sure command runs from current dir on Windows
-rw-r--r-- | src/luarocks/fetch/git.lua | 7 |
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 |