diff options
| author | ruki <[email protected]> | 2017-05-25 08:34:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-25 08:34:50 +0800 |
| commit | 9a889c9f9e8b512e157ce7ce6a1b4bae51d1507b (patch) | |
| tree | e58326a3d2eb577cb1450e944cb9a5eddf5bd3d7 /xmake/modules/privilege/sudo.lua | |
| parent | ea123cda41560f549861eca8222a4153cb72bbd6 (diff) | |
fix sudo module bug
Diffstat (limited to 'xmake/modules/privilege/sudo.lua')
| -rw-r--r-- | xmake/modules/privilege/sudo.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/privilege/sudo.lua b/xmake/modules/privilege/sudo.lua index ae35ee23a..ea00957f2 100644 --- a/xmake/modules/privilege/sudo.lua +++ b/xmake/modules/privilege/sudo.lua @@ -38,7 +38,7 @@ function _sudo(runner, cmd, ...) assert(program, "sudo not found!") -- run it with administrator permission and preserve parent environment - runner(program .. " PATH=" .. os.getenv("PATH") .. " " .. cmd, ...) + runner(program .. " PATH=\"" .. os.getenv("PATH") .. "\" " .. cmd, ...) end -- sudo run shell with administrator permission and arguments list @@ -90,7 +90,7 @@ end -- sudo run shell with arguments list function runv(shellname, argv) - return _sudo(os.run, shellname, argv) + return _sudov(os.run, shellname, argv) end -- sudo quietly run shell and echo verbose info if [-v|--verbose] option is enabled @@ -100,7 +100,7 @@ end -- sudo quietly run shell with arguments list and echo verbose info if [-v|--verbose] option is enabled function vrunv(shellname, argv) - return _sudo(os.vrunv, shellname, argv) + return _sudov(os.vrunv, shellname, argv) end -- sudo run shell and return output and error data @@ -110,7 +110,7 @@ end -- sudo run shell and return output and error data function iorunv(shellname, argv) - return _sudo(os.iorunv, shellname, argv) + return _sudov(os.iorunv, shellname, argv) end -- sudo execute shell @@ -120,7 +120,7 @@ end -- sudo execute shell with arguments list function execv(shellname, argv) - return _sudo(os.execv, shellname, argv) + return _sudov(os.execv, shellname, argv) end -- sudo run lua script |
