summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-08-30 16:01:59 +0800
committerOpportunityLiu <[email protected]>2019-08-30 16:01:59 +0800
commit499f64300634421754fde8c5f139f8055dd1fa25 (patch)
tree82e2e1a4df79e53b2aae91cc988b3ca6cdb22d2c
parent6d1a2327b13b6bff9d94715dceedaf4a4651c968 (diff)
simplify XMAKE_SKIP_HISTORY
-rw-r--r--xmake/core/main.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index c4c1af0a6..3d305a345 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -220,14 +220,8 @@ Or you can add `--root` option or XMAKE_ROOT=y to allow run as root temporarily.
end
-- save command lines to history
- local skipHistory = os.getenv('XMAKE_SKIP_HISTORY')
- if skipHistory then
- skipHistory = skipHistory:lower():trim()
- end
- if not skipHistory or skipHistory == '' or skipHistory == 'false' or skipHistory == '0' then
- skipHistory = false
- end
- if os.isfile(os.projectfile()) and not skipHistory then
+ local skipHistory = (os.getenv('XMAKE_SKIP_HISTORY') or ''):trim()
+ if os.isfile(os.projectfile()) and skipHistory == '' then
history("local.history"):save("cmdlines", option.cmdline())
end