Browse Source

Do not try to get Git revision in `git.rev_parse` if the directory is not a repo.

pull/1018/head
Joao Matos 8 years ago
parent
commit
082349654e
  1. 3
      build/scripts/Utils.lua

3
build/scripts/Utils.lua

@ -74,6 +74,9 @@ function git.checkout(dir, rev) @@ -74,6 +74,9 @@ function git.checkout(dir, rev)
end
function git.rev_parse(dir, rev)
if not os.isdir(dir .. "/.git") then
return nil
end
local cmd = "git -C " .. path.translate(dir, sep) .. " rev-parse " .. rev
return outputof(cmd)
end

Loading…
Cancel
Save