diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-06-18 11:44:05 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-06-18 11:44:05 -0300 |
commit | 7fb623cc55b36aa11ab9a67108960c350ebf2688 (patch) | |
tree | a1a297ea188b8c66e5ab54da8561bfcbffcf0255 /src | |
parent | f032ff7e5a00ed2d945a6fc2200c93919f88829d (diff) | |
parent | 83449f223ce59695bbd628abb0fb6c418a713c0f (diff) | |
download | luarocks-7fb623cc55b36aa11ab9a67108960c350ebf2688.tar.gz luarocks-7fb623cc55b36aa11ab9a67108960c350ebf2688.tar.bz2 luarocks-7fb623cc55b36aa11ab9a67108960c350ebf2688.zip |
Merge pull request #387 from ignacio/check_git
Checks if git is installed
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fetch/git.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua index 53fd4445..bea53fc8 100644 --- a/src/luarocks/fetch/git.lua +++ b/src/luarocks/fetch/git.lua | |||
@@ -40,6 +40,10 @@ function git.get_sources(rockspec, extract, dest_dir, depth) | |||
40 | -- Strip off .git from base name if present | 40 | -- Strip off .git from base name if present |
41 | module = module:gsub("%.git$", "") | 41 | module = module:gsub("%.git$", "") |
42 | 42 | ||
43 | if not fs.execute_quiet(git_cmd, "--version") then | ||
44 | return nil, "'"..git_cmd.."' program not found. Is git installed? You may want to edit variables.GIT" | ||
45 | end | ||
46 | |||
43 | local store_dir | 47 | local store_dir |
44 | if not dest_dir then | 48 | if not dest_dir then |
45 | store_dir = fs.make_temp_dir(name_version) | 49 | store_dir = fs.make_temp_dir(name_version) |