fix: 修复sh脚本部分情况下执行失败的问题
设置工作目录失效导致执行异常 Log: 修复sh脚本部分情况下执行失败的问题 Influence: RunCommandWithOptions接口执行脚本文件 Bug: https://pms.uniontech.com/bug-view-181747.html Change-Id: Ia7b0da9705e337d2361f751b3cc37b3ecced6e69
This commit is contained in:
		@ -475,12 +475,12 @@ bool StartManager::launch(DesktopInfo *info, QString cmdLine, uint32_t timestamp
 | 
			
		||||
 | 
			
		||||
bool StartManager::doRunCommandWithOptions(QString exe, QStringList args, QVariantMap options)
 | 
			
		||||
{
 | 
			
		||||
    QProcess process;
 | 
			
		||||
    if (options.find("dir") != options.end()) {
 | 
			
		||||
        process.setWorkingDirectory(options["dir"].toString());
 | 
			
		||||
        qDebug() << options["dir"].toString();
 | 
			
		||||
        return QProcess::startDetached(exe, args, options["dir"].toString());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return process.startDetached(exe, args);
 | 
			
		||||
    return QProcess::startDetached(exe, args);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StartManager::waitCmd(DesktopInfo *info, QProcess *process, QString cmdName)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user