From e165a8e43abed4eb2eca64c3b5adefb57cd65600 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 8 Jun 2019 00:32:31 +0800 Subject: fix warning for lua plugin --- xmake/actions/config/main.lua | 8 ++++++++ xmake/core/main.lua | 4 ---- 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() -- cgit v1.3.1