diff options
| author | ruki <[email protected]> | 2016-09-19 23:19:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-09-19 23:19:37 +0800 |
| commit | 7b5801df32bae47cee48905e800dc1bdbc17efae (patch) | |
| tree | 296cfcd57c6dceeb79eec15613dc2d54aae21a7a | |
| parent | 7ae0f53e70fe9909e3a42f8989fe1acc52168541 (diff) | |
fix os.execv raise error
| -rw-r--r-- | xmake/core/sandbox/modules/os.lua | 6 |
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 |
