summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-09-29 08:23:29 +0800
committerruki <[email protected]>2019-09-29 08:23:29 +0800
commit5a9ab3b1619d5a9a0fae65c385dd7b9397d2b248 (patch)
tree1d67d96493fbbe345787f1c09abb3b544cf6c62b
parent07c8483607759f79cb3cfbf7351ee07cc714d8b9 (diff)
improve tips for windows
-rw-r--r--xmake/core/base/option.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index c3850ccd8..1aa4a825c 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -808,13 +808,24 @@ function option.show_update_tips()
if os.isfile(versionfile) then
local versioninfo = io.load(versionfile)
if versioninfo and versioninfo.version and semver.compare(versioninfo.version, xmake._VERSION_SHORT) > 0 then
- local updatetips = string.format([[
+ local updatetips = nil
+ if os.host() == "windows" then
+ updatetips = string.format([[
+ ==========================================================================
+ | ${bright yellow}A new version of xmake is available!${clear} |
+ | |
+ | To update to the latest version ${bright}%s${clear}, run "xmake update". |
+ ==========================================================================
+]], versioninfo.version)
+ else
+ updatetips = string.format([[
╔════════════════════════════════════════════════════════════════════════════╗
║ ${bright yellow}A new version of xmake is available!${clear} ║
║ ║
║ To update to the latest version ${bright}%s${clear}, run "xmake update". ║
╚════════════════════════════════════════════════════════════════════════════╝
]], versioninfo.version)
+ end
io.print(colors.translate(updatetips))
end
end