summaryrefslogtreecommitdiff
path: root/xmake/modules/devel/git/checkout.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/devel/git/checkout.lua')
-rw-r--r--xmake/modules/devel/git/checkout.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/xmake/modules/devel/git/checkout.lua b/xmake/modules/devel/git/checkout.lua
index 4a4c92bae..8fc62e66f 100644
--- a/xmake/modules/devel/git/checkout.lua
+++ b/xmake/modules/devel/git/checkout.lua
@@ -42,10 +42,7 @@ function main(commit, opt)
opt = opt or {}
-- find git
- local git = find_tool("git")
- if not git then
- return
- end
+ local git = assert(find_tool("git"), "git not found!")
-- init argv
local argv = {"checkout", commit}