summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/sandbox/modules/os.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/os.lua b/xmake/core/sandbox/modules/os.lua
index 56f006f31..0eeb80ce9 100644
--- a/xmake/core/sandbox/modules/os.lua
+++ b/xmake/core/sandbox/modules/os.lua
@@ -287,7 +287,11 @@ function sandbox_os.execv(shellname, argv)
-- run it
local ok = os.execv(shellname, argv)
if ok ~= 0 then
- os.raise("execv(%s %s) failed(%d)!", shellname, table.concat(argv, ' '), ok)
+ if argv ~= nil then
+ os.raise("execv(%s %s) failed(%d)!", shellname, table.concat(argv, ' '), ok)
+ else
+ os.raise("execv(%s) failed(%d)!", shellname, ok)
+ end
end
end