diff options
| author | ruki <[email protected]> | 2019-01-02 22:56:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-02 11:36:27 +0800 |
| commit | b183f6326762e3797ad65fe81051f1e03494e331 (patch) | |
| tree | 7305b48ff7d58870f70fa1e44a6ad473992936ac /xmake/actions | |
| parent | 5190a07502ec7c962f0db3a628c0b05f3877cfff (diff) | |
use color.error and color.warning styles
Diffstat (limited to 'xmake/actions')
| -rw-r--r-- | xmake/actions/config/main.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/install/main.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/require/impl/action/download.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/require/impl/action/install.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/uninstall/main.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/update/main.lua | 4 |
7 files changed, 12 insertions, 12 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 03a274617..6fdf213b1 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -160,7 +160,7 @@ function main() if not option.get("quiet") and not option.get("yes") then -- show tips - cprint("${bright yellow}note: ${default yellow}xmake.lua not found, try generating it (pass -y to skip confirm)?") + cprint("${color.warning}note: ${clear}xmake.lua not found, try generating it (pass -y to skip confirm)?") cprint("please input: n (y/n)") -- get answer diff --git a/xmake/actions/install/main.lua b/xmake/actions/install/main.lua index 76e114396..b8ff8131b 100644 --- a/xmake/actions/install/main.lua +++ b/xmake/actions/install/main.lua @@ -122,7 +122,7 @@ function main() end -- show tips - cprint("${bright red}error: ${default red}installation failed, may permission denied!") + cprint("${color.error}error: ${clear}installation failed, may permission denied!") -- continue to install with administrator permission? if sudo.has() then @@ -132,7 +132,7 @@ function main() if confirm == nil then -- show tips - cprint("${bright yellow}note: ${default yellow}try continue to install with administrator permission again?") + cprint("${color.warning}note: ${clear}try continue to install with administrator permission again?") cprint("please input: y (y/n)") -- get answer diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index 5f1c6f4bf..ed9c52bae 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -207,7 +207,7 @@ function main(package) -- verbose? if option.get("verbose") and errors then - cprint("${bright red}error: ${clear}%s", errors) + cprint("${color.verbose.error}error: ${clear}%s", errors) end -- trace diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua index 82c9b7472..7955680c7 100644 --- a/xmake/actions/require/impl/action/install.lua +++ b/xmake/actions/require/impl/action/install.lua @@ -132,11 +132,11 @@ function main(package) -- verbose? if option.get("verbose") and errors then - cprint("${bright red}error: ${clear}%s", errors) + cprint("${color.verbose.error}error: ${clear}%s", errors) end -- trace - cprint("${red}failed") + cprint("${color.error}failed") -- failed if not package:requireinfo().optional then diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 22bb32358..c2b2f0617 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -334,7 +334,7 @@ function _get_confirm(packages) if confirm == nil then -- show tips - cprint("${bright yellow}note: ${default yellow}try installing these packages (pass -y to skip confirm)?") + cprint("${color.warning}note: ${clear}try installing these packages (pass -y to skip confirm)?") for _, package in ipairs(packages) do print(" -> %s %s %s", package:name(), package:version_str() or "", package:debug() and "(debug)" or "") end @@ -447,7 +447,7 @@ function install_packages(requires, opt) -- exists unsupported packages? if #packages_unsupported > 0 then -- show tips - cprint("${bright red}note: ${default red}the following packages are unsupported for $(plat)/$(arch)!") + cprint("${color.warning}note: ${clear}the following packages are unsupported for $(plat)/$(arch)!") for _, package in ipairs(packages_unsupported) do print(" -> %s %s", package:name(), package:version_str() or "") end diff --git a/xmake/actions/uninstall/main.lua b/xmake/actions/uninstall/main.lua index 30161c94f..bab865dc0 100644 --- a/xmake/actions/uninstall/main.lua +++ b/xmake/actions/uninstall/main.lua @@ -81,7 +81,7 @@ function main() end -- show tips - cprint("${bright red}error: ${default red}failed to uninstall, may permission denied!") + cprint("${color.error}error: ${clear}failed to uninstall, may permission denied!") -- continue to uninstall with administrator permission? if sudo.has() then @@ -91,7 +91,7 @@ function main() if confirm == nil then -- show tips - cprint("${bright yellow}note: ${default yellow}try continue to uninstall with administrator permission again?") + cprint("${color.warning}note: ${clear}try continue to uninstall with administrator permission again?") cprint("please input: y (y/n)") -- get answer diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index 57cea27b2..54ad2b8fc 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -72,7 +72,7 @@ function _sudo(cmd) end -- show tips - cprint("\r${bright red}error: ${default red}run `%s` failed, may permission denied!", cmd) + cprint("\r${color.error}error: ${clear}run `%s` failed, may permission denied!", cmd) -- continue to install with administrator permission? if sudo.has() then @@ -82,7 +82,7 @@ function _sudo(cmd) if confirm == nil then -- show tips - cprint("\r${bright yellow}note: ${default yellow}try continue to run `%s` with administrator permission again?", cmd) + cprint("\r${color.warning}note: ${clear}try continue to run `%s` with administrator permission again?", cmd) cprint("\rplease input: y (y/n)") -- get answer |
