From 0ca4e376f45503c3c06e483ba4c0f71614ce9957 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 26 May 2021 23:31:10 +0800 Subject: remove left ifelse --- xmake/actions/install/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmake/actions/install/main.lua b/xmake/actions/install/main.lua index 7d61ecaa4..af0a30078 100644 --- a/xmake/actions/install/main.lua +++ b/xmake/actions/install/main.lua @@ -78,7 +78,7 @@ function main() function () -- install target - install(targetname or ifelse(option.get("all"), "__all", "__def")) + install(targetname or (option.get("all") and "__all" or "__def")) -- trace cprint("${color.success}install ok!") @@ -96,7 +96,7 @@ function main() function () -- install target - install(targetname or ifelse(option.get("all"), "__all", "__def")) + install(targetname or (option.get("all") and "__all" or "__def")) -- trace cprint("${color.success}install ok!") @@ -118,7 +118,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 ifelse(option.get("all"), "__all", "__def"), option.get("installdir"), option.get("prefix")}) + sudo.runl(path.join(os.scriptdir(), "install_admin.lua"), {targetname or (option.get("all") and "__all" or "__def"), option.get("installdir"), option.get("prefix")}) -- trace cprint("${color.success}install ok!") -- cgit v1.3.1