From 7b5801df32bae47cee48905e800dc1bdbc17efae Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 19 Sep 2016 23:19:26 +0800 Subject: fix os.execv raise error --- xmake/core/sandbox/modules/os.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1