summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/actions/config/main.lua8
-rw-r--r--xmake/core/main.lua4
2 files changed, 8 insertions, 4 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua
index dfd6f8e53..611ecaf1a 100644
--- a/xmake/actions/config/main.lua
+++ b/xmake/actions/config/main.lua
@@ -157,6 +157,14 @@ function main()
end
end
+ -- enter the project directory
+ if os.isdir(os.projectdir()) then
+ if path.translate(os.projectdir()) ~= path.translate(os.workingdir()) then
+ utils.warning([[You are working in the project directory(%s) and you can also
+force to build in current directory via run `xmake -P .`]], os.projectdir())
+ end
+ end
+
-- enter menu config
if option.get("menu") then
menuconf_show()
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index 5659929d4..6d147ff94 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -150,10 +150,6 @@ function main._init()
-- enter the project directory
if os.isdir(os.projectdir()) then
- if path.translate(os.projectdir()) ~= path.translate(os.curdir()) then
- utils.warning([[You are working in the project directory(%s) and you can also
-force to build in current directory via run `xmake -P .`]], os.projectdir())
- end
xmake._WORKING_DIR = os.cd(os.projectdir())
else
xmake._WORKING_DIR = os.curdir()