summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
Diffstat (limited to 'xmake')
-rwxr-xr-xxmake/actions/clean/main.lua5
-rwxr-xr-xxmake/actions/config/main.lua5
-rw-r--r--xmake/core/main.lua6
3 files changed, 8 insertions, 8 deletions
diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua
index 8acfa6df9..45e473ca5 100755
--- a/xmake/actions/clean/main.lua
+++ b/xmake/actions/clean/main.lua
@@ -152,11 +152,6 @@ end
-- main
function main()
- -- check xmake.lua
- if not os.isfile(project.file()) then
- raise("xmake.lua not found!")
- end
-
-- get the target name
local targetname = option.get("target")
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua
index 2d3e1701f..d9495318a 100755
--- a/xmake/actions/config/main.lua
+++ b/xmake/actions/config/main.lua
@@ -135,6 +135,11 @@ function main()
-- check xmake.lua
if not os.isfile(project.file()) then
+
+ -- remove config directory if exists because the current directory is not a project
+ os.rm(config.directory(), true)
+
+ -- error
raise("xmake.lua not found!")
end
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index ee336b118..ffd2b123e 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -113,14 +113,14 @@ function main.done()
return -1
end
- -- save command lines to history
- history.save("cmdlines", option.cmdline())
-
-- run help?
if main._help() then
return 0
end
+ -- save command lines to history
+ history.save("cmdlines", option.cmdline())
+
-- run task
local ok, errors = task.run(option.taskname() or "build")
if not ok then