summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/sandbox/modules/import/core/project/project.lua7
-rw-r--r--xmake/core/sandbox/sandbox.lua13
2 files changed, 20 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua
index 0e527df38..6805d661a 100644
--- a/xmake/core/sandbox/modules/import/core/project/project.lua
+++ b/xmake/core/sandbox/modules/import/core/project/project.lua
@@ -66,6 +66,13 @@ function sandbox_core_project_project.targets()
return targets
end
+-- get the project file
+function sandbox_core_project_project.file()
+
+ -- get it
+ return xmake._PROJECT_FILE
+end
+
-- get the project directory
function sandbox_core_project_project.directory()
diff --git a/xmake/core/sandbox/sandbox.lua b/xmake/core/sandbox/sandbox.lua
index 244f1032d..dd2dcc23c 100644
--- a/xmake/core/sandbox/sandbox.lua
+++ b/xmake/core/sandbox/sandbox.lua
@@ -29,10 +29,23 @@ local path = require("base/path")
local table = require("base/table")
local utils = require("base/utils")
local string = require("base/string")
+local option = require("base/option")
-- traceback
function sandbox._traceback(errors)
+ -- not verbose?
+ if not option.get("verbose") then
+ if errors then
+ -- remove the prefix info
+ local _, pos = errors:find(":%d+: ")
+ if pos then
+ return errors:sub(pos + 1)
+ end
+ end
+ return errors
+ end
+
-- init results
local results = ""
if errors then