summaryrefslogtreecommitdiff
path: root/xmake/actions/require/install.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-09-20 22:36:46 +0800
committerruki <[email protected]>2017-09-20 09:40:39 +0800
commit218e2711e1afacd334ce50b37b0fa2d2db573e8e (patch)
tree1f335873793c96d5e3cd1e9e9d149bb3fcba0bef /xmake/actions/require/install.lua
parent8edce1f3f7f2e779eb3bf66702d4b5271e82a63b (diff)
add some install scripts for package manager
Diffstat (limited to 'xmake/actions/require/install.lua')
-rw-r--r--xmake/actions/require/install.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/actions/require/install.lua b/xmake/actions/require/install.lua
index 6d16de732..764745c33 100644
--- a/xmake/actions/require/install.lua
+++ b/xmake/actions/require/install.lua
@@ -26,7 +26,7 @@
import("core.base.option")
import("core.base.task")
import("core.project.project")
-import("detect.tools.find_git")
+import("lib.detect.find_tool")
import("action")
import("package")
import("repository")
@@ -114,7 +114,7 @@ function _install_packages(requires)
--
-- attempt to install git from the builtin-packages first if git not found
--
- if find_git() and not repository.pulled() then
+ if find_tool("git") and not repository.pulled() then
task.run("repo", {update = true})
end
@@ -192,7 +192,7 @@ function main(requires)
environment.enter()
-- git not found? install it first
- if not find_git() then
+ if not find_tool("git") then
_install_packages("git")
end