summaryrefslogtreecommitdiff
path: root/xmake/actions/install/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/actions/install/main.lua')
-rw-r--r--xmake/actions/install/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/actions/install/main.lua b/xmake/actions/install/main.lua
index 40ba15cc3..82534ffe0 100644
--- a/xmake/actions/install/main.lua
+++ b/xmake/actions/install/main.lua
@@ -46,7 +46,7 @@ function _check_targets(targetname)
-- filter and check targets with builtin-install script
local targetnames = {}
for _, target in ipairs(targets) do
- if not target:is_phony() and target:is_enabled() and not target:script("install") then
+ if target:targetfile() and target:is_enabled() and not target:script("install") then
local targetfile = target:targetfile()
if targetfile and not os.isfile(targetfile) then
table.insert(targetnames, target:name())
@@ -110,7 +110,7 @@ function main()
if sudo.has() and option.get("admin") then
-- install target with administrator permission
- sudo.runl(path.join(os.scriptdir(), "install_admin.lua"), {targetname or (option.get("all") and "__all" or "__def"), option.get("installdir"), option.get("prefix")})
+ sudo.execl(path.join(os.scriptdir(), "install_admin.lua"), {targetname or (option.get("all") and "__all" or "__def"), option.get("installdir"), option.get("prefix")})
cprint("${color.success}install ok!")
ok = true
end