linux上升级软件中对dpkg提权
This commit is contained in:
parent
581d2d139e
commit
bd5706e333
|
@ -138,7 +138,7 @@ bool Upgrade(const std::string& pkgPath)
|
|||
}
|
||||
|
||||
#else
|
||||
std::string cmd = "dpkg -i \"" + pkgPath + "\"";
|
||||
std::string cmd = "pkexec dpkg -i \"" + pkgPath + "\"";
|
||||
if (0 == system(cmd.c_str()))
|
||||
ret = true;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue