forked from qt-creator/qt-creator
Android: Provide more info when createAvd failed
Fixes: QTCREATORBUG-30852 Change-Id: I9334a25c6e15a615dbf52736c9369821ba0ff8b9 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -974,8 +974,12 @@ expected_str<void> createAvd(const CreateAvdInfo &info, bool force)
|
||||
|
||||
GuardLocker locker(s_instance->m_avdPathGuard);
|
||||
process.runBlocking();
|
||||
if (process.result() != ProcessResult::FinishedWithSuccess)
|
||||
return Utils::make_unexpected(process.exitMessage());
|
||||
if (process.result() != ProcessResult::FinishedWithSuccess) {
|
||||
const QString stdErr = process.stdErr();
|
||||
const QString errorMessage = stdErr.isEmpty() ? process.exitMessage()
|
||||
: process.exitMessage() + "\n\n" + stdErr;
|
||||
return Utils::make_unexpected(errorMessage);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user