mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-04 17:42:20 +08:00
Merge pull request !347 from shenmo/revert-merge-344-Reason
This commit is contained in:
commit
0a32245f63
@ -177,12 +177,13 @@ void DownloadItem::slotAsyncInstall(int t)
|
|||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args << "/tmp/spark-store/" + ui->label_filename->text().toUtf8();
|
args << "/usr/local/bin/ssinstall"
|
||||||
|
<< "/tmp/spark-store/" + ui->label_filename->text().toUtf8();
|
||||||
if (!installExtraArg.isEmpty()) {
|
if (!installExtraArg.isEmpty()) {
|
||||||
args << installExtraArg;
|
args << installExtraArg;
|
||||||
}
|
}
|
||||||
args << "--delete-after-install";
|
args << "--delete-after-install";
|
||||||
installer.start("/usr/local/bin/ssinstall", args);
|
installer.start("pkexec", args);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -128,8 +128,9 @@ function parse_args() {
|
|||||||
# 验证当前用户
|
# 验证当前用户
|
||||||
function validate_user() {
|
function validate_user() {
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
pkexec DISPLAY=$DISPLAY "$0" "$@"
|
echo "${TRANSHELL_CONTENT_PLEASE_RUN_AS_ROOT}"
|
||||||
exit $?
|
echo "OMG-IT-GOES-WRONG"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user